Skip to content

Instantly share code, notes, and snippets.

@irfn
Created August 29, 2011 04:37
Show Gist options
  • Save irfn/1177777 to your computer and use it in GitHub Desktop.
Save irfn/1177777 to your computer and use it in GitHub Desktop.
useful git configs
[core]
quotepath = false
editor = mate -w
[color]
branch = auto
diff = auto
interactive = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[format]
pretty = format:%Cred%h%Creset - %Cgreen%an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset
date = relative
[alias]
pom = pull origin master
puom = push origin master
rhh = reset HEAD --hard
y = diff "@{yesterday}"
w = whatchanged
c = commit
st = status
dc = diff --cached
co = checkout
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lpg = log --pretty=oneline --graph --all
lgn = "!f() { git log --graph --pretty=format:'%Cred%H%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --date=relative $@ | git name-rev --stdin --name-only ; } ; f"
log1 = log --pretty=oneline --abbrev-commit --decorate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment