How to delete the remote Git branch via the Command Palette(Ctrl+Shift+P) in Visual Studio Code?

4.3k Views Asked by At

I want to delete the remote branch in Visual Studio Code but it seems like it's not supported.

GitLens supports Delete Branch (via Terminal) but I want to do it from the Command Palette.

I tried finding the extension but couldn't find one.

Can anyone suggest how can I delete remote branches via the command palette in Visual Studio Code?

1

There are 1 best solutions below

0
VonC On

but I want to do it from Command Palette.
Tried finding the extension but couldn't find one.

Currently, as shown in vscode-gitlens issue 385, this is done only though terminal:

  • Go to Source Control view (Ctrl + Shift + G) and expand the GITLENS section in the sidebar
  • Find branch to delete under Remotes (e.g. geolocation)
  • Right click on branch and choose Delete Branch (via Terminal)

Text entered into terminal reads: git push origin :aRemoteBranch

That remains (Q1 2019) the official way to delete a remote branch.