Last Updated: February 25, 2016
·
273
· walidvb

git save points no-commit

Sometimes I'm working on stuff, want to try something but don't want to commit. Basically something like this: on HEAD, got to HEAD', happy with this, want to test smth before commiting.

git commit
#on HEAD
#edit to HEAD'
git stash save
#edit to HEAD''
git reset --hard HEAD -> back to HEAD
#if i want to test more stuff
git stash apply -> back to HEAD'
#if i was happy with HEAD', then
git stash pop

There!