Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - Undo forced checkout from IntelliJ IDE

Tags:

git

github

I had some uncommitted changes in my local, by mistake, I did force checkout instead of smart checkout in IntelliJ

Is there any way to revert back?

like image 208
prabhatojha Avatar asked May 29 '18 10:05

prabhatojha


1 Answers

The only way is to open VCS → Local History menu and revert to a state which was before your Forced Checkout.

Important things to notice:

  1. Be sure to select the whole project folder first, otherwise you would be looking at Local History for only currently active file.
  2. You will revert to the state that was before your checkout, which means you would have to extract lost changelist files through a lot of rubbish.
like image 145
soshial Avatar answered Oct 14 '22 08:10

soshial