Get back lost shelf changes
NickName:Sanjay Dutt Ask DateTime:2016-09-20T16:11:59

Get back lost shelf changes

I have shelved my 26 java files changes via Intellij Idea 2016.2.1 and I checkout to different branch.

When I came to old branch to check my shelved changes.

I gone a mad now, I lost all the files. I was worked nearly two months

Can somebody help to get it back?

Copyright Notice:Content Author:「Sanjay Dutt」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39588887/get-back-lost-shelf-changes

Answers
tcb 2016-09-20T20:43:48

You can restore the state of those files if they were edited in IntelliJ. Use local history to see all the changes made in IntelliJ (VCS -> Local History -> Show History).",


Andrei 2020-03-19T08:20:44

Even there isn't Shelf tab in IDE you can find shelved changes as patch files at {ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf. \n\nThen your can apply any selected patch.",


cnash 2020-12-10T20:25:47

I was able to view lost changes and revert back to them by:\n\nright click on project directory, select Local History > Show History\nFind the entry in the history menu that you want to restore. You can examine the files by double clicking on the entry and the files to examine differences.\nRight click on the entry you want to restore, and select Revert\n\nNote in my case Git>VCS Operations>Show History showed nothing. Only through the Project Files menu.",


Josh 2022-04-27T15:18:48

Andrei's answer was helpful for my situation where I renamed my project and my previously shelved changes were no longer found under the shelf, but I did run into an issue when applying the patch file because I was prompted to "Select missing base" for various files in the patch. Similar to what is seen in the screenshot below:\n\nhttps://youtrack.jetbrains.com/issue/IDEA-183910\nI was able to avoid having to "Select missing base" for various files by first changing the default shelf location and then applying the patch.\n\nhttps://www.jetbrains.com/help/idea/shelving-and-unshelving-changes.html#change-shelve-location\nAlso, I found my patch in this location:\n{ProjectName}/.idea/shelf\n\ninstead of the aforementioned location:\n{ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf\n",


Zaphoid 2022-08-04T14:15:19

Maybe this will help someone:\nI lost part of my shelved changes in combination with an update of IntelliJ. I'm not sure if the update was the reason but eventually most of my most recent (and important) changes were gone.\nI couldn't restore them from local history as this does not "survive" an update of IDEA. But in the files I saw that there still is some data:\nC:\\Users\\myUser\\AppData\\Local\\JetBrains\\IntelliJIdea2021.2\\LocalHistory had a changes.storageData with ~50MB.\nCopying the files to the folder of the new version didn't help as the files got overwritten again.\nSolution:\nI was able to get the old version of IntelliJ (2021.2) here and installed it. This can be done in parallel, without removing the newer version.\nHere I was able to retrieve my changes from the Local History and shelve or apply them again.\nHint: Backup the "Local History" folder (or the whole IntelliJIdea20xx.x folder) before you start. I don't remember if I had to copy it in there again or if it worked out of the box. (Just to be sure the local history doesn't get lost).",


More about “Get back lost shelf changes” related questions

Get back lost shelf changes

I have shelved my 26 java files changes via Intellij Idea 2016.2.1 and I checkout to different branch. When I came to old branch to check my shelved changes. I gone a mad now, I lost all the file...

Show Detail

How to restore shelved changes in Intellij when the shelf tab is not shown?

I tried to use the "shelf" feature for the first time in IntelliJ IDEA today. I shelved all my current changes so that I could work on a quick bugfix, commit it, and come back to my current work

Show Detail

Is there a way to get a mercurial shelf back after a merge mistake?

When I unshelve, it uses mercurial's merge capability, but I'm not seeing any way to get back the original shelved patch and redo things if I've completed the merge with an error. Aside from sear...

Show Detail

Lost Changes after rolling back the last push on git

I rolled back my last push from git using the following commands: git reset --hard HEAD@{1} git push -f git reset --hard HEAD@{1} The push was successfully deleted but I lost all the changes from ...

Show Detail

Android studio shelved changes disappeared, not even in the .idea/shelf directory

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 A...

Show Detail

Android studio shelved changes disappeared, not even in the .idea/shelf directory

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 A...

Show Detail

Pycharm - Shelved Changes... now I'd like it back

I was working on branch1 but had to switch to branch2, so while in branch1 (also, I didn't commit) I went to VCS-> Shelve Changes... then hoped onto branch2 and did stuff. Now I'm back at branch...

Show Detail

Get last item name on the shelf

I have this table: CREATE TABLE stock (shelf varchar, item_id INT, item_name varchar); Now I want to get a list of last items on each shelf. Last item is the item with the largest item_id. I know...

Show Detail

React state change not showing changes when going back

I have an app that lists books on a users shelf and then on a subsequent search page. The user goes to the search page, finds a title and selects a shelf for the title to be shelved on. When they g...

Show Detail

Get or download Shelf Code in Team Foundation Server (TFS)

I am fairly new to TFS, like Mel from this post: https://softwareengineering.stackexchange.com/q/142977/27650 I had a project on another PC, but I have been issued another PC. Yes, I could go to

Show Detail