Create a good looking git commit tree in terminal
Git log is a powerful command, but the output can be very boring and linear. What if you could make it look like this:
This is basically git log with some bells and whistles added. I have created an alias called lol
for this. You can call it what you want. Here is how you add it to your global git config:
Now you can use it:
Here is a breakdown of all the flags used:
-
--graph
creates a the graphical representation of the commit history tree. -
--decorate
the default behaviour is set to short which prints just the name of the branch or tag instead of full ref name -
--pretty=oneline
prints out the commit log content in the form -
--abrev-commit
shortens the 40-byte hexadecimal commit object number. -
--all
shows all the local branches