Reputation: 23
I use Git in Visual Studio as a local version control tool just for myself. Therefore, I have no remote repositories connected and everything runs locally.
My Problem: The Graph only shows one line instead of forked branches. can somebody explain this, please? Please see the below pictures: This is what I got:
This is what I want:
If the pictures are unavailable:
What I got: # What I want
Graph descr. Branch # Graph descr. Branch
--------------------------------------------------------
O change2 Test # | O change2 Test
| # | |
O change1 Test # | O change1 Test
| # |/
O init master # O init master
I think I have a misunderstanding of how Git actually works, but please help me or show me a good guide.
Thanks in advance !! :)
Upvotes: 1
Views: 996
Reputation: 1328152
If:
DongleFree
branch is made on top of TestBranch
TestBranch
branch is made on top of master
Then a git log --oneline --graph --decorate --branches --all
would show the same as Visual Studio: one single line.
Once you have actual concurrent developments (different commits in two different branches, from one common ancestor), you will see forks in the commit graph.
The OP Lexxy_B confirms in the comments:
This is exactly the Problem! Visual Studio only shows the current Branch.
And this feature is not yet implemented: "View history of multiple branches in the same graph".
As detailed in rtfmpliz's answer, this is implemented in Visual Studio 2022 17.7+.
See "Multi-branch Git Graph"
Building on the work in preview, we've implemented the multi-branch graph to enable visualizing multiple branches in the same graph along with other UI improvements.
It includes the "Cleared Toggled Branches in History" icon to focus on your selected branch in the list:
Upvotes: 2
Reputation: 339
there are already update on the visual studio manage branches, now there are toggle to show other branch on the graph
here is detailed explanation https://devblogs.microsoft.com/visualstudio/multi-branch-graph-available-for-general-audiences/
for more info about feature request in below links
Upvotes: 1