DEV Community

Discussion on: git reflog saved my ass.

oligospermia profile image

Well changes should be in the stash of course. Then you accidentally lose it (via git stash clear or git stash drop). However, even if changes weren't committed, they still do have some hash tags in the repository, they are stored as so called "dangled commits". So all you have to do is find such hash and apply it via stash command to restore. You can see an example here:

Thread Thread
leanminmachine profile image
leanminmachine Author

nice, thanks for the link!