12 December 2008

Pimp your git meme

Zack's post on git colors is a perfect opportunity to recycle this old post of mine on how to make git diff look more like quilt diff and vim.

For good mesure I'll also throw in this snippet (stolen here) which adds a git rlog alias, very handy when you just want to grab the short hash of a recent commit:

[alias]
rlog = log --pretty=format:\"%h %Cblue%cr%Creset %cn %Cgreen%s%Creset\"
It looks like this:

3 comments:

bartman said...

my favorite is git log1

[alias]
log1 = log --pretty=oneline --abbrev-commit

But I have more...
http://www.jukie.net/~bart/conf/gitconfig

Gerfried Fuchs said...

That rlog alias has problems with non-ascii characters (like in committer's names). Where git log does show them correctly your rlog alias does break them. Do you have a cure for that?

heviosso said...

%an is better than %cn if you prefer to see authors' names instead of committers (which is, I believe, often the case).

Post a Comment