Possible Duplicate:
Is there any way to undo the effects of “git revert head”?
By mistake, I messed up with my GIT. Several times I executed git reset –soft HEAD^^ & then committed my changes. I never cared about what this command does !
Started like this; I created my local branch & then cherry pick the change. Later I followed
git reset –soft HEAD^^ & then local commit every time.
I just realized that I did wrong !
Can anyone explain what this command does ? Any implication to my code ?
Where exactly my HEAD should point to & how can I do that ?
Just see
git reflogand find the original HEAD that you want to go to (referenced asHEAD@{0}etc.) and dogit reset --hard HEAD@{n}And try to run idempotent commands as much as possible. Avoid
HEAD~etc and if you use, make sure you don’t just randomly rerun them.