views:

145

answers:

4

What are your favorite Git configuration settings which make your life easy while working with Git?

+4  A: 

The aliases I mention in Trimming GIT Checkins (and the fixup! action from the recent Git1.7.0):

[alias]
    fixup = !sh -c 'git commit -m \"fixup! $(git log -1 --format='\\''%s'\\'' $@)\"' -
    squash = !sh -c 'git commit -m \"squash! $(git log -1 --format='\\''%s'\\'' $@)\"' 

, really help me to commit very often even though I am in the middle of one task, allowing me to finish it with one coherent commit at the end (instead of too many small intermediate commits).
Not exactly "fun", but very useful.

VonC
+1  A: 

I use:

[color]
    ui = auto

It makes diffs and things pretty. :-)

Daniel Stutzbach
A: 
alias gs='git status'
alias ga='git add .'
alias gc='git commit -m'

This is 80% of the typing I do in git on any given day. I know I can combine the last two aliases with the -am flag, but it's nice to have the separated, that way I can check the status of the index before I commit.

kubi
+2  A: 

Best one I have was picked up off Scott Chacon from a talk he gave:

[alias]
    lol = log --pretty=oneline --abbrev-commit --graph --decorate

I get excited every time I type git lol.

csexton