how to remove merge commit pushed code example
Example 1: git undo merge
git reset --hard HEAD~1
Example 2: git undo merge
git reset --hard HEAD~1
git reset --hard <commit_sha>
Example 3: git merge pushed commits
git push origin +master
git reset --hard HEAD~1
git reset --hard HEAD~1
git reset --hard <commit_sha>
git push origin +master