Visual Studio 2022 Git Branch Manager Icons

Viewed 74

In Visual Studio 2022, when I click on Git > Manage Branches, I get a list of branches. These branches have blue and green icons next to them. What do these mean?

enter image description here

1 Answers

I was unable to find any documentation on these particular icons, but I believe the green up arrow icon denotes the branch has a remote tracking branch that can be pushed to. See how this popup contains a "Tracked Branch" item:

branch with a tracking reference

For a branch that doesn't have a remote tracking branch, this icon doesn't appear and their is no "Tracked Branch" item in the popup:

local branch

Also, if I push this branch, the icon appears immediately after the git push completes since it now has a remote tracking reference. Likewise, if I right click the branch and "Unset Upstream Branch", the icon disappears. I imagine if you delete the remote branch as well and prune this icon would also disappear (it doesn't look like Visual Studio provides a way to do this though so you would have to use a command line or some other tool).

As for the blue icon with two arrows pointing inward, I believe that simply denotes that it is a remote/origin branch.

Related