Vscode-gitlens: List of branches on remote (origin - GitHub) shows deleted branches

Created on 26 Sep 2020  路  3Comments  路  Source: eamodio/vscode-gitlens

As part of our development flow, we squash/merge dev branches to master on GitHub and delete the original branch.
My understanding is that the dev branch isn't really deleted, but is just somehow "flagged" as deleted on GitHub.

Using GitLens, when I look at the list of branches on remote (GitHub), it lists every branch including the "deleted" ones.

Is there currently a way for GitLens to only show active remote branches, and not "deleted" ones?
Or do I need to submit this as a feature request?

needs more info question

Most helpful comment

My guess is that you need to do a prune to get your local repo in sync with GitHub. Do the branches go away if you run git fetch --prune?

All 3 comments

My guess is that you need to do a prune to get your local repo in sync with GitHub. Do the branches go away if you run git fetch --prune?

@eamodio, Thank you! Yes, it was that simple. Obviously I still have a bit to learn about git/GitHub (and GitLens).

Is there a way to accomplish that from within GitLens? I don't see any settings related to that. I would have expected that to be the default behavior for "Refresh" (or to have a setting that controls the behavior).

Using the _GitLens: Fetch_ command (from the command palette or the fetch button on the _Commits_ view) or choosing _fetch_ from the _GitLens: Git Command Palette_, you can choose _Fetch & Prune_

image

Also, if you want vscode to do this automatically on any fetch, you can set git.pruneOnFetch": true in your settings.json

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mindpivot picture mindpivot  路  4Comments

eamodio picture eamodio  路  3Comments

Ardeshir81 picture Ardeshir81  路  3Comments

ahhmarr picture ahhmarr  路  3Comments

robertzauner picture robertzauner  路  3Comments