Check git reflogand find your commit.
The safest thing is to create a branch in the βlostβ commit, and then check to see if everything is dandy using gitkorgit log -p
git branch recovery HEAD@{1}
git log -p recovery
This new branch can then be merged, recreated on top of the master, waving it, etc. There are many possibilities in git to shoot yourself in the leg, as well as several other ways to re-attach this leg (possibly to the arms).
If you have not made any new commits to master, you can simply merge the commit in question, which will be resolved as a quick merge with git:
git merge HEAD@{1}
- master, , reset , git reset. - , (git stash save)
git reset --keep HEAD@{1}
, , - , git branch newbranch git checkout -b newbranch