A few new git aliases:
git undo
- Undo the most recent commit, unstaging all new filesgit up
- Update remote branches and submodules, delete merged branchesgit wipe
- Remove all current changes, saving as a seperate branch
Specifically, these three lines in my global .gitconfig
:
[alias]
...
undo = reset HEAD~1 --mixed
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
These three all came from this post: GitHub Flow Like a Pro with these 13 Git Aliases.
You can see the entire file here: .gitconfig