Skip to content

Instantly share code, notes, and snippets.

@maurofranchi
Created August 24, 2018 22:41
Show Gist options
  • Save maurofranchi/0f4275498e9f76cd29e19c0ca5bc67ba to your computer and use it in GitHub Desktop.
Save maurofranchi/0f4275498e9f76cd29e19c0ca5bc67ba to your computer and use it in GitHub Desktop.
[alias]
com = checkout master
co = checkout
ec = config --global -e
po = push origin
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
cm = !git add -A && git commit
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"
syncfpo = !git fetch upstream && git co master && git merge upstream/master && git po
syncf = !git fetch upstream && git co master && git merge upstream/master
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
addupstream = "!f() { git remote add upstream $1; }; f"
bd = branch -d
bdr = po --delete
fpa = fetch --prune --all
rau = remote add upstream
rv = remote -v
upm = !git com && git fpa && git syncf && git po
snf = !git com && git fpa && git syncf && git po && git cob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment