Reputation: 1575
I was getting an error while trying to push changes from XCode to remote git repo.
I followed this answer which made me lose all my project files. The only remaining are the .xcodeproj and Pods directory. How can I revert to original state after calling this commands
git init
git add .
git stash save
git branch --set-upstream-to=origin/master
git pull -r
git stash pop
git push
Just learnt my lesson on following instructions without understanding.
Upvotes: 0
Views: 265
Reputation: 10102
It might be easier for you to use and understand git
if you use git client like https://gitup.co/
It clearly shows you -
It has a dedicated view for adding/deleting stashes as well. For each stash, you can view the diff in a very readable way.
Install the app, open your git
repository using this app & it will show you exactly what is the state of your current repo.
It will also show you the git stashes you have saved locally & allow you to pull/push from/to remote in an easy way.
Upvotes: 1