vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

Show Current branch

Open Tiiatcha opened this issue 6 years ago • 1 comments

Firstly, I am still getting my head around git and version control so it maybe that I don't have a proper understanding but... When creating a new branch, this is not displayed visually as a branch. The branches are only visualised after merging but would be helpful to see current branch separated. It's a map of where I have been not where I am going or where I am. Perhaps that is the way it is meant to be but I feel there is room for improvement.

In this image, I now know that I have checked out the new branch (Another-branch) but visually this is not clear. Gitgraph now In this image is my thought of how it might perhaps look: GitGraph idea

Tiiatcha avatar Mar 01 '20 23:03 Tiiatcha

Hi @CraigDavison,

In the example you provided in your first screenshot you have not checked out the branch “Another-Branch”, the “master” branch is still checked out (the label is bolded and it is outlined in colour to indicate this). I think what you’ve done is created “Another-Branch”, without checking it out. You can check out a branch either by double clicking on its label, or by selecting the option on the “Create Branch” dialog.

Each row in the Git Graph View is a commit, it does not represent a branch as you’ve indicated in your second screenshot. A branch in Git points to a specific commit, that is why the branch “Another-Branch” is on the commit “Merge branch ‘Bootstrap’”, as that is the commit the branch is currently pointing to.

It is only once you check out “Another-Branch” and make a new commit on it that a new commit row will be added to the Git Graph View, and the “Another-Branch” label will move to the new commit (as you’re expecting in the second screenshot).

If what I’ve described still is unclear to you please read more about Git. The Git Graph View’s rendering algorithm is consistent with almost every other Git GUI, and the git log command. I’m sure once you have a better understanding of Git the current display will completely make sense to you.

mhutchie avatar Mar 02 '20 02:03 mhutchie