Skip to content

Instantly share code, notes, and snippets.

@hazzik
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hazzik/0905de065c96ea1449ea to your computer and use it in GitHub Desktop.
Save hazzik/0905de065c96ea1449ea to your computer and use it in GitHub Desktop.
[alias]
co = checkout
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
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 -r git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
approve = "!f() { git fetch origin $(echo $@ | xargs -n 1 | xargs -I {} echo refs/pull/{}/head:gh-{} ) && git merge $(echo $@ | xargs -n 1 | xargs -I {} echo gh-{}) --edit --log; }; f"
am-url = "!f() { curl -s $1 2>nul | git am ${@:2}; }; f"
[user]
email = hazzik@gmail.com
name = Alexander Zaytsev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment