6

when I working with gitlab, for some feature I create new branch and work on it and after commit,push,merge I remove branch that was I worked on it from gitlab and then click on Sync command in VS Code git command to sync. but all of branches that i created and many of them is merge and deleted are still exists in vs code branch list, how to I sync VS Code branch list with git and gitlab or github. if it's helpful I also using Git Lens in VS Code

enter image description here

MBehtemam
  • 7,865
  • 15
  • 66
  • 108

2 Answers2

4

According to @VonC answer and this SF Question an alternative solution is run this command in VS Code Terminal or any terminal in your git repository :

git fetch --prune
MBehtemam
  • 7,865
  • 15
  • 66
  • 108
0

That was requested here but PR 25862 only implemented the git local branch deletion, not the remote one.

GitLens also requested that feature.

For now, you still need to push the deletion of a local branch in order to delete the remote one.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250