Skip to content

Tips and tricks

Frédéric Tessier edited this page Feb 17, 2017 · 26 revisions

git color

Add this to your git config file to colorize output of git commands by default:

color.ui=auto

git log

To decorate the log with branch names and to abbreviate commit hashes to seven characters, use --decorate=full and --abbrev-commit, respectively, or add the following to your git configuration file to turn this on by default:

log.decorate=full
log.abbrevcommit=true

To summarize one commit per line and show the commit tree:

git log --oneline --graph

To list files that have changed in each commit, along with diff statistics:

git log --stat

To show the detailed changes (patches) in each commit:

git log --patch
Clone this wiki locally