You have:
A --- B --- C - branch_a
\ \
--D--- E ---F - branch_b
branch_a
was merged to branch_b
, but the content of branch_a
is unchanged. You can do git checkout branch_a
and the files on your file system will be as they were on branch_a
before the merge.
If the merge of branch_a
to branch_b
(commit F
) was wrong, you can roll it back, and set branch_b
to where it was before the merge. git reset
is the command of choice for moving HEAD
s (branches) around:
git checkout branch_b
git reset <SHA_1 of commit E> # --hard would update your local files as well, if you wish
resulting in:
A --- B --- C - branch_a
\
--D--- E - branch_b
Commit F
has disappeared (you could still find it, at least for a while, but that is more advanced).