re: git reflog saved my ass. VIEW POST


reflog can even help when you accidentally drop/clear stashed changes (those that weren't even committed really yet).


? how does it work if the changes arent committed or stashed somewhere..?


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:


nice, thanks for the link!

Code of Conduct Report abuse