Create a Git branch in Visual Studio
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
It's easy to create a new branch in Visual Studio; all you have to do is base it off an existing branch.
From the Git menu, select New Branch.
In the Create a new branch dialog box, enter a branch name.
For branch naming details, see Special characters in branch and tag names.
In the Based on section, use the drop-down list to choose whether you want to base your new branch off an existing local branch or a remote branch.
The Checkout branch checkbox, which is on by default, automatically switches to the newly created branch. Toggle this option if you want to remain in the current branch.
There you have it; you've created a new branch.
The equivalent command for this action is
git checkout -b <new-branch> <existing-branch>.
For more information about the latest updates that improve branch switching, see the Visual Studio 2022 Performance Enhancements: Git Branch Switching blog post.