Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any command to open list of branches in VS Code?

There is a command git.branch in VS Code keyboards shortcuts. This command opens dialog to create new branch.

I can not find the command to open list of all branches. Is there any command for it?

like image 703
Sharikov Vladislav Avatar asked May 11 '17 08:05

Sharikov Vladislav


People also ask

How do I list all branches in VS Code?

When you open a project in VS Code that is version controlled (it has the . git folder) you will see the branch icon in the bottom left corner of your window. If you click on the branch, you will see a list of branches that you can checkout.


1 Answers

Yes, there is the git: Checkout to... command. It displays the picker including all known branches. You can execute this command also by clicking on the current branch name displayed on the statusbar's left side.

Look for the command git.checkout in case you want to create a keybinding for it. If you add the following code to your keybindings.json then you will trigger the command by typing SHIFT+ALT+G:

{
    "key": "shift+alt+g",
    "command": "git.checkout"
}
like image 92
Wosi Avatar answered Nov 12 '22 13:11

Wosi