In this case, if you output git log --online, you should see something like this
c6 merge iss53 to master
c5
c3
c4
c2
c1
...
As you can see, c4,c6 are commits from the master branch, and c5,c3 are commits from the iss53 branch
If we want to undo the merge, I would normally do something like this
git reset --hard c4
But this is a bit inconvenient... I just want to undo the merge I just did, and I have to find the previous commit of the master branch in the merged logs of the two branches, as shown above (I have to find c4, not c5).
It's not hard, of course, but... I was wondering if there is a better way to do it.
And this is separate from the above question, I have 2 more questions.
1.
if I don't do reset as above, and proceed with git reset --hard HEAD~, the merge is canceled fine.
But I'm confused, with the merge in place, isn't HEAD~ c4 and not c5?
I thought it would be git reset --hard HEAD~ == git reset --hard c5, but it's not?
2.
following on from the above question, what happens if I type git reset --hard c5?
I've tried it myself, but I'm a bit confused as to how it works.

git reset --hard HEAD~if it's the commit you are on that you want to undo.git reset --hard HEAD~- it means to go back to 1 commit before HEAD, which is the same asgit reset --hard c5, isn't it?some-commit~orsome-commit^). The branch that you merged in is the second parent (which can be referred to assome-commit^2).git checkout c4; git merge c5, then@~will bec4. If you didgit checkout c5; git merge c4, then@~will bec5.~inHEAD~means "the first parent" andHEAD~therefore means "the first parent of HEAD". The merge commit has two parents. Assuming that the merge command wasgit merge iss53while you were on branchmaster(i.e., c4 was the HEAD commit back then), then c4 is the first parent of the merge commit, and c5 is the second parent.