title: reverting push'd git commit
body: <p>I've got a repo with two branches-- master and dev. I was working on the master branch and pulled, and got a message that the repo was up to date. I committed my changes, and pushed to the remote repo (on github). I got a message saying that some changes were rejected. </p>
  
  <p>I then did a <code>git pull origin dev</code>, which apparently was the wrong thing to do-- since it merged the dev branch with my master, and like an idiot I didn't notice this until I'd already pushed again. So the last commit shows <code>Merge branch 'dev' of github.com:myuser/myrepo</code>.</p>
  
  <p>I can get back to the last known good status on my local repo by doing a <code>git reset --hard [sha]</code>, with [sha] being the commit before the merge (though I'm not sure how to then make that change to the origin)-- or from what I've read I can also do a <code>git revert -m</code> and then commit/push that change. </p>
  
  <p>Can anyone walk me through the "right way" to undo my merge, and restore both branches back to where they were prior to the merge?</p>
  
  <p>Thanks-- if it matters this is a shared repo with only two developers, so it's not under heavy changes.</p>
  
  <p>Edit to add: please talk to me as if I were a child. I have to admit this Git stuff still confuses me, so I'm far from a power user! Thanks</p>