Defining "bad merge"
A bad merge can mean: you merged the wrong branch, you resolved conflicts incorrectly, the merge introduced a regression, or you merged before review was complete. Each has a different fix. The key is acting fast and using the right tool.
Case 1: not yet pushed
If the merge is local-only, undo it cleanly:
git reset --hard ORIG_HEAD
ORIG_HEAD records the pre-merge HEAD; this command rewinds the branch to before the merge. Add HEAD@{1} if ORIG_HEAD has been overwritten.