Skip to content

Instantly share code, notes, and snippets.

Last active May 5, 2022 12:58
What would you like to do?
Git Aliases
name = Dan Rabb
email =
askpass = git-gui--askpass
editor = vim
last = log -1 HEAD
logline = log --pretty=format:\"%C(yellow)%h %C(blue)%ad %C(red)(%an) %C(reset)%s\" --date=short
submod = submodule update --init --recursive
cmp = !sh -c 'git difftool --dir-diff $1 $2' --
dd = difftool --dir-diff
pr = !sh -c 'export EDITOR=vim && git push -u origin $(git rev-parse --abbrev-ref HEAD) && gh pr create $1' --
ac = commit -am
# danger zone. credit eric musso:
cleanup = "git push origin --delete ${git branch -r --merged origin/master | grep origin | egrep -v '>|master|develop' | cut -d/ -f2- "
tool = meld
prompt = false
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"
[color "status"]
branch = yellow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment