Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can git undo a checkout of unstaged files

Tags:

git

I accidentially discard my changes on files in my local working tree via git checkout. The files aren't staged at this time. Is it posible to "undo" this checkout?

like image 697
Michael Wallasch Avatar asked Sep 29 '22 09:09

Michael Wallasch


1 Answers

If you are using a "professional" IDE chances are good that you can restore files from a local History. In Rubymine for example you can right click files and watch a history of changes independent from the git changes, saved me a few times now ^^

like image 187
Christoph Geschwind Avatar answered Oct 12 '22 17:10

Christoph Geschwind