Stash your work
The git stash
command takes all your uncommitted changes (both staged
and unstaged
) and saves them in a pile.
git stash
This is how it looks before…
And this is after…
Pop back your work
At any time, you can pop back your work. You do however need to commit or remove all changes you have made to the document.
git stash pop
And simple as that, our work is back, exactly the same as before.