Skip to content

Instantly share code, notes, and snippets.

@arkaitzgarro
Last active March 7, 2017 09:13
Show Gist options
  • Save arkaitzgarro/e3a5b91fd4930a99d32bf930fe0bb2d8 to your computer and use it in GitHub Desktop.
Save arkaitzgarro/e3a5b91fd4930a99d32bf930fe0bb2d8 to your computer and use it in GitHub Desktop.
Github aliases
[alias]
st = status
co = checkout
ec = config --global -e
# You Only Live Once
yolo = push --force --no-verify
# Update form origin without loosing changes
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
# Create a new branch
cob = checkout -b
# Reset previous commit
undo = reset HEAD~1 --mixed
# Fix last commit message
amend = commit -a --amend
# Commit and reset
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
# Cleanup merged brunches
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment