Skip to content

Instantly share code, notes, and snippets.

@ithinkdancan
Last active July 31, 2019 19:34
Show Gist options
  • Save ithinkdancan/dcf6850128d4e6737e6b3d547fa0d5fb to your computer and use it in GitHub Desktop.
Save ithinkdancan/dcf6850128d4e6737e6b3d547fa0d5fb to your computer and use it in GitHub Desktop.
[alias]
alias = config --get-regexp alias
ec = config --global -e
st = status
co = checkout
cob = checkout -b
up = pull --rebase upstream master
pb = !git push --set-upstream origin "$(git rev-parse --abbrev-ref HEAD)"
db = !f() { git branch -d $1; git push origin :$1; }; f
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
wip = !git add -u && git commit -m "WIP"
undo = reset HEAD~1 --mixed
amend = commit -a --amend
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
[push]
default = simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment