How to Delete a Local Branch in Visual Studio Code

I am going to take you through a step by step procedure on how to delete a local branch in Visual Studio Code. If you have been using Visual Studio Code for your daily coding necessities, you already know how fun and easy it is to use.

If you are yet to discover how easy and fun VSC really is, I would recommend you to first go through its downloading and installing procedure.

Once you have installed Visual Studio Code on your system, you can explore it, and see for yourself, how VSC is better than a lot of IDEs that are out there.

Even before begin, let’s make sure we have fulfilled the following prerequisites.

First of all you should not be in the same branch you want to delete. That’s like common sense right?

So just go to your master branch or any other branch except the one that you are trying to delete. I have just gone to the master so that I don’t accidentally delete it. LOL!

go to master

Steps to Delete a Local Branch in Visual Studio Code

Step 1: Press Ctrl + Shift + P to open the Show All Commands Feature as suggested when you have nothing opened. You can also call it a commands palette.

Ctrl + Shift + P option in how to delete a branch in visual studio code tutorial

Step 2: Then type Delete in the bar where you have the typing option.

git: delete branch option

Step 3: Select Git: Delete Branch…

When you select the delete branch option, you will be shown all those branches that you can delete.

select a branch to be deleted

I want to delete fix_talent_Tms.

Just click on the branch you wish to delete.

That branch will be deleted. That’s it!

You can check by repeating the whole process from Step 1 to 3 to see if that branch is still being shown or not.

how to delete a branch in visual studio code final screen

See! Gone already!

So simple right?

Now that you know how to delete it using VSC, you can also check out how to delete it using git.

If you click this easy tutorial, check out more tutorials on DITD. Tell us how do you like DITD tutorials in the comments section below.

Scottshak

Poet. Author. Blogger. Screenwriter. Director. Editor. Software Engineer. Author of "Songs of a Ruin" and proud owner of four websites and two production houses. Also, one of the geekiest Test Automation Engineers based in Ahmedabad.

You may also like...

7 Responses

  1. Quinn Favo says:

    Helpful, thank you! πŸ™‚

  2. asad says:

    i’m not getting the option for branches, yet the branch master is still showing in bar

  3. Srini says:

    Thank you πŸ˜€

  1. December 17, 2019

    […] If you are using Visual Studio Code, the job becomes a lot more easier. Here’s how to do it using VSC. […]

Leave a Reply