FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.43k stars 636 forks source link

Holy shit I lost my code #1404

Closed thepra closed 3 years ago

thepra commented 4 years ago

I had a pending checkout before the latest local commit, I did the checkout and my local commit disappeared, losing all my changes! :( How it is possible that a local commit disappear because a checkout was made right before the latest commit?

ylecuyer commented 4 years ago

You can follow this link to recover your commit https://stackoverflow.com/a/10099285

jung-kim commented 3 years ago

This is a frequently recurring issue where people claim to hav lost their committed code. In git, it's actually quite difficult to lose code and in fact you would have to try to lose code once committed.

Ungit doesn't display all git nodes, some git nodes are not in display if they are are not lead by a branch.

You can always recover or revert by doing git reflog and checkout by git sha1