to get rid of the status "All conflicts fixed but you are still merging." there is git merge --continue
to abort the current merge (and return to what you call the (future) parent) you could use git merge --abort
. That is always a nice option, because you can just start over
to see what happened to your repo before the merge use git reflog
every line is one step that git took for you:
Haass@LAPTOP-ETDGT1PT MINGW64 /c/devel/inventory (master)
$ git reflog
398e725 (HEAD -> master, upstream/master) HEAD@{0}: reset: moving to upstream/master
8700bfd (origin/master, origin/HEAD) HEAD@{1}: checkout: moving from 398e72552f3300d0389426b17feae6543305156f to master
398e725 (HEAD -> master, upstream/master) HEAD@{2}: checkout: moving from master to upstream/master
8700bfd (origin/master, origin/HEAD) HEAD@{3}: rebase finished: returning to refs/heads/master
8700bfd (origin/master, origin/HEAD) HEAD@{4}: rebase: checkout refs/remotes/origin/master
be73d62 HEAD@{5}: reset: moving to HEAD
It looks like this. before a merge there always is a checkout, so go from top to bottom and find the first checkout. The first column is the git hash you can use for checkout.
In such situations I like to git tag
my steps, so that I can return to any intermediate step whenever i get lost in some git actions