vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

Deleted remote branches still show up in Git Graph

Open LBF38 opened this issue 9 months ago • 3 comments

Describe the Bug The remote branches already deleted on the remote git platform (GitHub, GitLab or others) still show up in the Git Graph and can easily clutter the whole interface. Thus, it would be nice if the extension could detect deleted remote branches and refresh the view based on the received data.

Steps to Reproduce Steps to reproduce the behaviour:

  1. Clone a repo
  2. Open Git Graph and see remote branches
  3. Go to the remote Git platform of this repo
  4. Delete a remote branch for testing it
  5. Return in the Git Graph extension locally and refresh view
  6. See that the deleted remote branch is still shown by the extension

Expected Behaviour When a branch is deleted, remotely or locally, it should be updated/reflected in the Git Graph view.

Environment

  • Git Graph Extension Version: 1.30.0
  • Visual Studio Code Version: 1.88.1
  • Operating System: Windows 11 w/ WSL setup

Screenshots (optional) Add any screenshots showing the bug.

Additional Context (optional) Add any other context about the problem here.

LBF38 avatar Apr 27 '24 17:04 LBF38

you probably need to uncheck the reflog option which does this

phil294 avatar Apr 27 '24 17:04 phil294

how do you change this setting ? I have tried checking or unchecking the include commits only mentioned by reflogs but it doesn't do anything, I still see all the remote branches that should be deleted in the local Git Graph extension in VS Code.

LBF38 avatar Apr 27 '24 17:04 LBF38

oh ok in this case I don't know.

I'd just guess they aren't really deleted or the fetching process fails, perhaps due to missing authentication... maybe try fetching the remotes to see if any errors arise, other than that no idea

phil294 avatar Apr 28 '24 06:04 phil294

You need to add --prune argument when fetching. This is part of git functionality and not really a bug in git graph. You can configure git to automatically prune during fetch.

See https://git-scm.com/docs/git-fetch/en#_pruning and especially the config fetch.prune

manuel-garnier avatar May 14 '24 10:05 manuel-garnier

You need to add --prune argument when fetching. This is part of git functionality and not really a bug in git graph. You can configure git to automatically prune during fetch.

See https://git-scm.com/docs/git-fetch/en#_pruning and especially the config fetch.prune

Thanks for the tips ! It works as expected, thank you !

LBF38 avatar May 16 '24 19:05 LBF38