Question

I have a branch in git and I am on that branch and not on master branch.
Using git log --graph I can only see linearly that I am on that branch. But I can not see that I have "splitted" from the master branch.
I.e. I see:

* b  
*     
*    
*    

Where b is the private branch I made and I was expecting to see:

*master  
* / *b  
*    
*  
*  

But I do see this in gitk. Is it not possible to get an accurate graph of the tree via command line?

Était-ce utile?

La solution

In order to see the same as in gitk, you would need at least a:

git log --branches

A more complete equivalent would be a:

git log --oneline --graph --decorate --all

I use a more complex alias in "How to display the tag name and branch name using git log --graph".

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top