4 ms·
The other option here is to do a "WIP" (work in progress) commit. Which you can undo (moving the files back into the staging area) with `git reset HEAD^` once y
by nicoburns 4y ago
The other option here is to do a "WIP" (work in progress) commit. Which you can undo (moving the files back into the staging area) with `git reset HEAD^` once you switch back to the branch. Annoying that this is necessary - it would be great if git stash was as robust - but this won't lose your work.
- guitarbill 4y agoYou can also use `git stash apply` (which doesn't pop the stash), followed by maybe merging, and finally a `git stash drop`.
- GauntletWizard 4y agoYou can also use the git reflog to get the recently dropped stash commit's sha, and then check out the files that you miss.