Data Loss / IDE Crash: Shelve changes disappeared and merged files rolled back after Task Manager kill during freeze

Answered

While manually merging files from a shelved change, IntelliJ IDEA froze entirely (Not Responding). After killing the process via Task Manager and restarting the IDE, the entire shelf entry was missing, and the progress made on the previously merged files was completely lost.

Two days of active development work are currently missing.

Steps Leading to the Issue:

  1. I shelved a changelist containing approximately 2 days of work.
  2. I performed a Git pull to fetch and merge the latest remote changes into my local branch.
  3. Instead of using the standard "Unshelve" action, I began manually reviewing and merging my changes file-by-file from the Shelf tab view.
  4. I successfully merged the changes for the first 3 files.
  5. While attempting to process or open the 4th file, IntelliJ IDEA completely froze and became unresponsive. Windows reported an "IntelliJ IDEA is not responding" thread dump dialog.
  6. Because the IDE was completely locked up, I was forced to terminate the idea64.exe process via Task Manager.

Actual Result on Restart:

  1. Upon reopening IntelliJ IDEA, the shelf entry I created in Step 1 is completely gone from the Shelf tab.
  2. The manual merges I successfully completed for the first 3 files in Step 4 have also vanished; those files have reverted to their post-pull state.
0
1 comment
Official comment

Hello Ashish,

Thanks for posting this and sorry about the lost work. Let me share the recovery paths that typically work in this kind of situation, then a note on logs.

Recovery, in order of likelihood

1. IntelliJ Local History. Independent of Git, the IDE keeps the per-file change history. For each file you remember editing during the merge:
 - In the editor, right-click → Local History → Show History (or VCS | Local History | Show History).
 - The right pane lists timestamped revisions. Pick the latest one from before the freeze and use Revert to restore that version or copy specific blocks across.
 - Before doing anything else, make a backup copy of the IDE's LocalHistory folder. It lives under the IDE caches directory; the exact location per OS is documented here: https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html.
2. Git dangling commits. When a stash disappears from the stash list, the underlying commit object usually remains in .git/objects for some time. From the repository root:

git fsck --no-reflog --lost-found

3. That prints entries like dangling commit <hash>. Inspect each candidate with git show <hash> to see if the diff matches your missing stash. When you find it:

git stash apply <hash>

4. This reapplies the content onto your current working tree without disturbing anything else.
5. Git reflog. Even with the stash list empty, the reflog often still records the stash as WIP on <branch>: <message>. Try:

git reflog show stash
git reflog

6. If you find a stash@{N} entry pointing to a commit, recover it with git stash, apply stash@{N} or git checkout <hash> -- <path> to pull individual files.

On the root cause

The most likely sequence is this: when the IDE applies a stash via git stash pop, and the working-tree writing succeeds, but the post-apply stash-drop step is interrupted by a freeze or process kill, the stash ref ends up removed while the merge is still incomplete. The commit object itself is not deleted, which is why git fsck can still surface it.

For a deeper investigation

If the steps above do not recover your work, or if you would like us to look at the freeze itself, please open a private support ticket at https://intellij-support.jetbrains.com/. IDE logs and thread dumps tend to contain information that should not be shared publicly, so we collect those there. Reference this thread when you submit, and we will pick it up.

Regards,
Rajarshi

Please sign in to leave a comment.