Skip to content

Instantly share code, notes, and snippets.

@pauldowman
Created March 20, 2013 03:35
Show Gist options
  • Save pauldowman/5202116 to your computer and use it in GitHub Desktop.
Save pauldowman/5202116 to your computer and use it in GitHub Desktop.
Some useful git config settings. Save in the file named ".gitconfig" in your home directory.
[color]
diff = auto
status = auto
branch = auto
sh = auto
ui = true
wtf = auto
[color "branch"]
current = green reverse
local = green
remote = yellow
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
log = true
[alias]
c = commit -v
a = add --all
st = status -s
changed = ! git status -s | awk '{print $2}' | xargs # use this like "git changed subl", which will open all changed files in Sublime
co = checkout
l = log --pretty=format:'%Cred%h%Creset %an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lg = log --graph --pretty=format:'%Cred%h%Creset %an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
b = branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment