Git tricks



git config --global alias.hist 'log --online --decorate --graph --all'

It will create a new command "hist" and show commits (log), in one line, without needless information (online), with colors and branches (decorate), with branches style (graph) and with all branches.


git log --pretty=format:'%C(yellow)%h%C(reset) - %an [%C(green)%ar%C(reset)] %s'
Tuning output text

git log --online -- Gemfile - show only changes in Gemfile

Git blame Gemfile - show changes in that file a line by line

git show { commit hash } show only changes that commit

Comments