Git without saying is a fantastic tool; but
git log by default is a little ugly and actually sometimes can be a little difficult to read branches and merges quickly and accurately.
Here is an example output of basic
Hmm, well we have a list of commits that's useful. But what about when we want to see a log of two branches or where a branch starts and ends. It's a little confusing.
Lets see if we can improve git log by writing a new alias
git config --global alias.graph "log --pretty --color --decorate --graph"
Command break down:
git config- the git config command
--global- this is going to be a global config change. You will be able to access this command in all projects.
alias.graph- we are going to be adding to the alias section an alias called graph. If you look in
~/.gitconfiglater you will see the command.
"log --pretty --color --decorate --graph"- the git command we will run when the alias is called.
To run the new alias we now run the command: