Can someone please help me understand what\'s happening here?
I start with git log --oneline
, which spits out:
4df9421 (HEAD, master) mo
You should accept VonC's answer. To complete it :
The "missing commit" was not pushed to the server, or saved in another branch. Your git reset --hard
thus deleted it.
Fortunately, git has some sort of magic undo stack : git reflog
. Check VonC's link to figure out how to get it back.
Be careful when you use git reset
, this command can destroy commits.
As a rule of thumb : before you manipulate your history, make sure you still have some way of getting back to where you were. My local repositories are crippled with backup
, orig
and wip
branches, which I clean up every month or so.