yong ho yong ho - 4 months ago 71
Git Question

How to undo xcode discard all changes if not committed

I have a iOS project that I have some changes haven't commit. I clicked discard all changes mistakenly. I actually want to only discard a specific file's changes. But I clicked wrong button. And now everything are gone. How to undo the changes?

git status shows nothing.


I think you are out of luck. See this answer: Accidentally reverted to master, lost uncommitted changes

Since you did not commit, or stage any of your files, then having reverted them means they are lost.