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!
Written by Walid
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#