3

I have a nodjs project and i use IntelliJ to run it. Lately the project structure is not appearing as it used to, as if the project was not compiling. So, while searching for answeres, I clicked on the "Update project" button on the right top, but quickly realised it was going to update based on what was on the remote repo. I've been developing for a few weeks without a single commit because my company asked me to (don't ask why), and the code had sensible data so I didn't have a backup.

After clicking that button, IntelliJ asked me if I wanted to merge my project files with the remote ones, I just pressed Cancel, and that was enough for IntelliJ to merge my entire project and lose a bunch of files I've been working with.

Suprisingly, they're not even on the Local History list. Even though it says "279 files" there I can't click or find any of the files.

Despite not being able to find them, I went to the changes.storageData file under IntelliJIdea2017.2\system\LocalHistory, searched for the names of the files I'm looking for, and found them all there, which makes me think there's still a way of finding them.

So, does anyone know where I can find deleted files after pressing the git "Update project" button on IntelliJ when they're not on the Local History file list?

Thanks a lot in advance!

  • Are you using Local History at root level? Can you post a screenshot? In any case, IntelliJ should not remove local files like that unless you specifically ask it to... – Jeto Feb 15 '18 at 18:51
  • That's exactly what I though. I couldn't add a screenshot because I don't have enough "points" here I guess, but yeah, I was using it at root level. – Arnaldo Lucien Feb 15 '18 at 19:29
  • Do you remember the package names you was working with? Note that you can use Local history for packages/folders, which should show all tracked modifications in that directory/package. – Andrey Feb 16 '18 at 03:58
  • It just happened to meet too – cryptonkid Dec 27 '21 at 10:25

1 Answers1

0

As I understand, the files were not committed, so Update could not delete them, because git merge/rebase do not start when there are uncommitted changes (see e.g. this question)

They were probably automatically stashed before the update, and not unstashed because the update was actually canceled.

So the first place to check is git stash VCS - Git - Unstash... or Shelf (if Update project is configured to use Shelf)

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29
  • I did git stach and I got 74 files changed, 1432 insertions(+), 5988 deletions(-), but I still haven't got any changes on the directories I wanted nor my files back. – Arnaldo Lucien Feb 21 '18 at 10:46