Git aliases
[user]
name = me
email = me@me.me
[alias]
s = status -s
cm = commit -m
br = branch
branches = branch -a
del = branch -d
co = checkout
cb = checkout -b
ac = !git add . && git commit -am
df = diff
who = shortlog -s --
pr = pull --rebase origin master
cleanup = remote prune origin
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# most recent 8 commits formatted all nicelike
recent = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative -8
lgpf = log --pretty=format:'%h - %an, %ar : %s'
wc = whatchanged -p --abbrev-commit --pretty=medium
#for gh-pages
publish = push origin gh-pages
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
[mergetool "kdiff3"]
cmd = /Applications/kdiff3.app/Contents/MacOS/kdiff3
trustExitCode = false
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge $LOCAL $REMOTE
[mergetool]
keepBackup = false
[core]
excludesfile = ~/.gitignore
[push]
default = current