I have a local and its corresponding github repo. I have some commits as
A <- B <- C <- D
A being the latest.
This is situation on both the repos. I want to delete commit C as if it never happened.
So it should be like on git log
A <- B <- D
on both repos.
I tried git reset --soft <sha-commit-C>
and am now stuck. I can not see A, B
. Before doing any further steps i want to be fully sure that i know what i am doing.
git reflog
gives me :
git reflog
73ea54d HEAD@{0}: reset: moving to 73ea54d8
a594699 HEAD@{1}: rebase -i (finish): returning to refs/heads/unique_ptr_release
a594699 HEAD@{2}: checkout: moving from unique_ptr_release to a594699fb6f7d85bc8
a594699 HEAD@{3}: checkout: moving from unique_ptr_release to unique_ptr_release
a594699 HEAD@{4}: commit (merge): Merge branch 'master' into unique_ptr_release
HEAD@{4}
is what my Head was before reset --soft
command.
How do i get out of this situation ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…