I accidentally stashed changes and reverting my Xcode project to an old version. How do I revert this back to the changes I stashed?

Viewed 3713

Using Xcode, when attempting to Push a code update to Github, I was prompted with "Pull and Stash". I accidentally selected okay and now my Xcode project is an old version (the last one pushed to GitHub). How can I revert this back to the stashed version?

2 Answers

@Super Hrush's answer should work, but if you want to do it completely inside Xcode, try this:

1. Go to the Source Control navigator

vault icon

2. Control-click your stash, then click "Apply Stashed Changes..."

drop down of stashed changes folder

3. Click "Apply Stash"

Leave "Keep stash after applying" checked so that you can come back to your changes later. confirm apply stash

You can use

git stash apply

Additional characters to be able to post the answer

Related