Last active
August 29, 2015 14:07
-
-
Save TimMurphy/c6804a46df9988d575a7 to your computer and use it in GitHub Desktop.
Git Aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# References | |
# ---------- | |
# | |
# - http://haacked.com/archive/2014/07/28/github-flow-aliases/ | |
# update working copy before creating new branch | |
update = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
# checkout a branch | |
cob = checkout -b | |
# add all untracked files and commit | |
cm = !git add -A && git commit -m | |
# add all untracked files with 'SAVEPOINT' message | |
save = !git add -A && git commit -m 'SAVEPOINT' | |
# undo the previous commit | |
undo = reset HEAD~1 --mixed | |
# amend previous commit message | |
amend = commit -a --amend | |
# A save reset | |
safereset = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment