Reputation: 4623
I made a changes for a file but didn't commit, and then I made a git reset --hard HEAD~1
, is there anyway I can retrieve the content before the reset?
Upvotes: 1
Views: 36
Reputation: 9256
If you didn't commit it then you're probably out of luck as git will never have known anything about the changes. However, if you did commit but just didn't push then the reflog might be able to help. Luckily, I haven't needed it for a while but I think this is the article I've used in the past.
Upvotes: 2