All My Brain Where stuff from my brain lands

December 2, 2009

git logk

Filed under: Programming — Tags: , , , , — Dennis @ 4:37 pm

Do you like gitk? I find it almost invaluable in merging, branching, looking at old revisions, diffs, etc. I find it annoying that git log is hard to glean the same information. I searched a round a bit and found that git log is quite configurable as to what it outputs. Here is a simple alias that outputs the log with some of the data you’d find by viewing gitk.

git config alias.logk 'log --graph --pretty=format:"%h %ae: %s" --decorate --abbrev-commit'

You can add –global so you don’t have to make a logk alias for every repository.
You can also read the man page for “git log” and change the format to suite your liking.

Powered by WordPress

%d bloggers like this: