问题
I had some shelved changes in Android studio However, for some reason the shelved changes are not there anymore. I have checked /project_directory/.idea/shelf/ but they are not there either. does Android studio backup .patch files somewhere else other than .idea/shelf?
回答1:
As far as I know, you're probably screwed.
IntelliJ/Android Studio do not use git stash to do their "shelving", it's an entirely separate mechanism.
You might be able to recover the old version using the "Local History" function of the IDE, or maybe with file recovery software like photorec to recover the patch files.
Personally, I prefer to manage my version control myself with the git command line: you can open up a terminal inside IntelliJ to do this.
回答2:
I'm probably too late to help out, but this link should help! It speaks towards shelving/unshelving changes.
IntelliJ - Shelving and Unshelving Changes
回答3:
I had the same problem I solved it this way: go to VCS > Enable Version Control Integration. then go to View > Tool Windows > Version Control. now by clicking on version control tab you will see you previous shelved changes. Hope it helps someone :)
回答4:
I had the same problem today and none of the VCS tools were able to recover the stash.
Another workaround, assuming that the changes are fairly recent is to simply look in the local history of your entire project. You should see an entry called Revert - just revert your project to that state and your changes should be back.
If you don't see that entry, try going back in the history till you find the changes you're looking for.
来源:https://stackoverflow.com/questions/39497445/android-studio-shelved-changes-disappeared-not-even-in-the-idea-shelf-director