Skip to content

Instantly share code, notes, and snippets.

@drabb
Last active May 5, 2022 12:58
Embed
What would you like to do?
Git Aliases
[user]
name = Dan Rabb
email = dan@danrabb.com
[core]
askpass = git-gui--askpass
editor = vim
[alias]
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- "
[diff]
tool = meld
[difftool]
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