55

I have an open project in PhpStorm that I manage using SourceTree. I was trying to remove some image files from a commit using SourceTree, but accidentally selected a file that should not be deleted. I haven't changed anything (in either PhpStorm or SourceTree) since deleting the file. I tried to do Ctrl+Z in SourceTree but nothing happened. I then checked in PhpStorm Vcs -> local history, but it didn't show the file. How can I recover this file?

Sven van den Boogaart
  • 11,833
  • 21
  • 86
  • 169

2 Answers2

157

Try to right click on project main folder in phpStorm and select Local history / Show History in context menu (not vcs / local history). The file should be at the list as "Deleting".

Ncx
  • 1,722
  • 1
  • 11
  • 7
1

This is documented by JetBrains here

TL;DR

screencast

16kb
  • 889
  • 9
  • 17