Undoing a bad pull

Use git reflog to see what your HEAD pointed to before you screwed it up.

You should see something like:

48ab8d HEAD@{0}: pull: Fast-forward
a34bda HEAD@{5}: commit: my last commit message

Now, point your master branch back at the commit before the bad pull:

git reset --hard a34bda

Done. Like it never happened.


I can't totally understand your history from your question, but in general, if you make two merges (a pull is a merge), it is completely straightforward to remove one of them.

- o - o - o - A - M1 - M2 (master)
                 /    /
      - o - o - o    /   (origin/lounge)
                    /
             - o - o (origin/master)

The most obvious way:

 git checkout master
 git reset --hard A
 git merge origin/master

This uses your locally cached version of origin's master, if you want to merge whatever's out there now, use git pull origin master.