The power of version control comes alive when you can visualize your Git operations with the new multi-branch graph, available in 17.7 GA. In response to your feedback, we’ve delivered an improved graph experience. Track all the branches, commits, and merges that arise in your git workflows by viewing multiple branches at the same time.
Leveraging the Multi-branch Graph
Visualizing multiple branches empowers you to perform cross branch operations and makes it easy to understand the relationships between branches. In the past, you may have used tools like GitKraken, Sourcetree, or git log to visualize your repository history, but now, we’ve brought that rich graph into Visual Studio.
When you enter the Git Repository window (View > Git Repository), you can use the show/hide icon to toggle up to five branches in the graph. The branch labels and lines are now color-coded and stacked neatly, so it’s easy to trace which branch each commit belongs to. The “Branches” links at the top shows which branches are currently in view and allows you to quickly navigate between them. If you want to clear all the branches, use the Cleared Toggled Branches in History icon to focus on your selected branch in the list.
The multi-branch graph is designed to help you with a variety of complex git scenarios, such as:
- Managing multiple feature branches and keeping them up to date with the main branch
- Exploring the repository’s merge history and reviewing the changes made by other developers
- Cherry picking previous commits from other branches
- Right-click any commit on another branch and select “Cherry-pick” to add that commit to your currently checked out branch
- Comparing specific commits across branches
- Ctrl + select two commits across any two branches you have visualized and select “Compare Commits” to see a comparison window
Other Git Repository Window Improvements
In addition to improving the graph, we made a variety of UI improvements to the Git Repository window.
- Track your incoming and outgoing commits on the currently checked out branch
- See avatars for the authors in your Azure DevOps repos
- See smoother graph rendering updates
- Maximize your space by collapsing the branches panel or expanding your commit details.
Share your feedback
The multi-branch graph is the result of our collaboration with the community. We couldn’t have delivered this feature without the feedback we received from you all in surveys, interviews, and user studies. Please let us know what you think by taking this quick survey.
> … you can use the show/hide icon to toggle up to five branches in the graph.
The number of displayed branch is limited to five?
If yes, can you explain what this limitation?
It’s possible to show all branches?
this comment has been deleted.
Hi Cédric Vernou, thanks for your question, currently you cannot display more than five branches in the graph. I’ve added your suggestion on Developer Community, so others can vote on it – https://developercommunity.visualstudio.com/t/Allow-viewing-all-branches-in-multi-bran/10448434. Feel free to follow up there about why showing all the branches would be helpful to you in your workflow. Thanks!
Great feature! Thank for implement this into in my beloved IDE!!!
Is it on radar to make it remember window state? Width and collapse state of panes, etc.
Hi John B, thanks for your question, we’re collecting feedback on this suggestion ticket on Developer Community, so feel free to follow progress there – https://developercommunity.visualstudio.com/t/Remember-the-width-of-columns-in-the-Git/10448436?q=remember+window+state+git&sort=relevance&stateGroup=active
Thanks!
For me it is annoying that it automatically starts showing commits from multiple branches, when switching to another branch.
This was very confusion for me, so I switched it off. Funny enough when switching "multi branching" off, then it broke the display of commit-history after changing branches. Now 6 months old commits are shown at the top of the window, and when scrolling down then one can see the branch-top-commits with commits from today. Now one...
Hi Rolf Kristensen, thanks for your suggestion, we’re collecting feedback on this suggestion ticket on Developer Community, so feel free to follow progress there or create other suggestions – https://developercommunity.visualstudio.com/t/Remember-the-width-of-columns-in-the-Git/10448436?q=remember+window+state+git&sort=relevance&stateGroup=active
Thanks!