Undoing the last (local) merge (and thus rewriting the history):
git reset --hard HEAD~
Reverting last commit (commits the commit of mainline before the last commit again)
git revert -m 1 HEAD
Details: http://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#Undoing-Merges
👍