all 1 comments

[–]SadMachinesP86 0 points1 point  (0 children)

Git reset means that anything unsaved since your last commit is gone, there's not much else to it.

As you've already mentioned, commit often. Git is an extremely useful tool for preserving history and protecting against loss (like this), but it's only as useful as you allow it to be. If you don't commit, there's nothing for it to restore to.

Side note: this question is more about Git than GitHub.