As usual when I have completed a fix, thought of pushing it to git.
Then I committed the code and pulled with rebase origin branch to overcome the conflicts. Unfortunately I got conflicts, then thought of skipping the rebase using git rebase --skip
.
Once I skipped the rebase I lost my last commit. I have checked by using git log
and all the possible ways but I couldn't find my commit.
Later I got a solution from stackoverflow, then I have used git reflog
. It shows my lost commit with hash code.
Here the thing which helps me was having meaningful commit message. I used to think why I am following meaningful commit message. Today I realized it.
Having meaningful commit message will help you.