Git alias: abbreviate your commands and options

I recently discovered aliases in git – very useful. So far my favorites have been log commands. The first alias below will create a decorated (shows refs) oneline log summary along with an ascii graph of the branch history. The second will show the author’s relative date, the hash id (sha1), and the subject (message) of any events in the ref log.

git config --global alias.plog 'log --oneline --decorate --graph`
git config --global alias.rtlog 'log --pretty=format:"%ar : %h : %s"'

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s