Using Git for Windows - Accidentally lost a ton of work. Can I get it back?
I am so confused and I think I lost many hours of work.
I previously edited the file in Git and I saved it but didn't commit. I made a few other changes to the file, and committed and clicked. However, one file got corrupted, so I clicked on the last successful commit and hit rollback to this commit. To my dismay, it erased all my unplanned changes and now I have no idea how to get them back since they weren't committed.
source to share
You say you didn't do it. Unfortunately git only keeps commits and doesn't undo work. So, as bad as I am, there is no way to use git to get your work back.
But you can try to recover deleted files .
You can also check out this terrible coding post.
source to share
You can now (March 2013) check with GitHub for Windows if you can undo Rollback:
See " Cancel Button on GitHub for Windows "
we've added Undo support for Dumps, Commands, Undo and Merges :
I don't know if your rollback will keep your unset and uncommitted changes, so a new Undo button may not be a good enough solution.
source to share