git

Git Log Tree View

The git log command shows the commit log history. The command below draws a graphical tree representation of the commit history:

git log --graph --decorate --oneline

Git Tree Log

To make it easier you can alias the command:

alias gl="git log --graph --decorate --oneline"

Remove Tracked Files From Git

This has happened to me multiple times, especially with the dreaded .DS_Store file. I’ll stage all of the files that have changed (git add .) and, without noticing, also add in the .DS_Store. Adding this file to .gitignore will still cause it to be tracked because git cached it. You can stop these kinds of files from being tracked with the following command:

git rm --cached <file>