I'm currently making commits and using branches in my remote Git repo. But, whenever I use:
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
It just shows my commit history in a single line - no branches, despite branches being named 'origin/API', 'origin/dev' and 'origin/master'.
If you have a look at Showing Git branch structure (where I got the command from) the screenshot shows 'branches' and 'merges'
Can you guys help me? I wish to view my repo in a tree fashion (helps me visualise better) rather than a beanstalk...
Try this one to view a graph of your repo over time.
git log --oneline --graph --all --decorate
Note that the decorate
will show you where the heads of the various merged in branches are. And oneline
gets it all on one line so that it is easy to navigate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With