title: Unable to resolve reference refs /refs/remotes/origin/branch while pushing after merging branches
body: <p>New to git and github.</p>
  
  <p>I want to replace the git <code>master</code> branch with my other branch <code>bridge</code> both locally and remotely. The problem is that git is unable to resolve the references for the <code>bridge</code> branch. The problem arises from pushing to github.</p>
  
  <p>How the git tree came to be this way:</p>
  
  <ol>
  <li>Started master branch via the Git GUI.</li>
  <li>Continued and then realized it wasn't that great and transitioned to the Bash.</li>
  <li>Wasn't able to push to github anymore to master as the tip of the local master branch was one behind the tip of the remote counterpart.</li>
  <li><p>To circumvent, I created another branch called bridge. I didn't like that I had made bridge the default so I then tried to change it back to master using:</p>
  
  <pre>
  git checkout better_branch
  git merge --strategy=ours master    # keep the content of this branch, but record a merge
  git checkout master
  git merge better_branch             # fast-forward master up to the merge
  </pre></li>
  <li><p>It worked locally. However, when I tried to push I got the following:</p>
  
  <pre>
  NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master)
  $ git push
  warning: push.default is unset; its implicit value is changing in
  Git 2.0 from 'matching' to 'simple'. To squelch this message
  and maintain the current behavior after the default changes, use:
  
    git config --global push.default matching
  
  To squelch this message and adopt the new behavior now, use:
  
    git config --global push.default simple
  
  See 'git help config' and search for 'push.default' for further information.
  (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
  'current' instead of 'simple' if you sometimes use older versions of Git)
  Enter passphrase for key '/c/Users/NAME/.ssh/id_rsa':
  To git@github.com:NAMEtaylor/tabtrack.git
   ! [rejected]        master -> master (non-fast-forward)
  error: unable to resolve reference refs/remotes/origin/bridge: No error
  error: Cannot lock the ref 'refs/remotes/origin/bridge'.
  error: failed to push some refs to 'git@github.com:NAMEtaylor/tabtrack.git'
  hint: Updates were rejected because the tip of your current branch is behind
  hint: its remote counterpart. Integrate the remote changes (e.g.
  hint: 'git pull ...') before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  </pre>
  
  <pre>
  NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master)
  $ git push origin master
  Enter passphrase for key '/c/Users/NAME/.ssh/id_rsa':
  To git@github.com:NAMEtaylor/tabtrack.git
   ! [rejected]        master -> master (non-fast-forward)
  error: failed to push some refs to 'git@github.com:NAMEtaylor/tabtrack.git'
  hint: Updates were rejected because the tip of your current branch is behind
  hint: its remote counterpart. Integrate the remote changes (e.g.
  hint: 'git pull ...') before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  </pre>
  
  <pre>
  NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master)
  $ git push origin bridge
  Enter passphrase for key '/c/Users/NAME/.ssh/id_rsa':
  error: unable to resolve reference refs/remotes/origin/bridge: No error
  error: Cannot lock the ref 'refs/remotes/origin/bridge'.
  Everything up-to-date
  </pre></li>
  <li><p>I tried to <code>git push -f</code> but:</p>
  
  <pre>
  NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (bridge)
  $ git checkout master
  Switched to branch 'master'
  
  NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master)
  $ git push -f
  warning: push.default is unset; its implicit value is changing in
  Git 2.0 from 'matching' to 'simple'. To squelch this message
  and maintain the current behavior after the default changes, use:
  
    git config --global push.default matching
  
  To squelch this message and adopt the new behavior now, use:
  
    git config --global push.default simple
  
  See 'git help config' and search for 'push.default' for further information.
  (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
  'current' instead of 'simple' if you sometimes use older versions of Git)
  
  Enter passphrase for key '/c/Users/NAME/.ssh/id_rsa':
  Counting objects: 13, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (7/7), done.
  Writing objects: 100% (7/7), 898 bytes | 0 bytes/s, done.
  Total 7 (delta 5), reused 0 (delta 0)
  To git@github.com:NAMEtaylor/tabtrack.git
  <ul>
  <li>1297c9f...bfa60d5 master -> master (forced update)
  error: unable to resolve reference refs/remotes/origin/bridge: No such file or d
  irectory
  error: Cannot lock the ref 'refs/remotes/origin/bridge'.</li>
  </ul>
  NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master)
  $ git status
  On branch master
  nothing to commit, working directory clean
  </pre></li>
  <li><p>Finally I tried to <code>git push origin bridge --verbose</code> as per advice on some stackoverflow questions:</p>
  
  <pre>
  $ git push origin bridge --verbose
  Pushing to git@github.com:ishaantaylor/tabtrack.git
  Enter passphrase for key '/c/Users/Ishaan/.ssh/id_rsa':
  To git@github.com:ishaantaylor/tabtrack.git
   = [up to date]      bridge -> bridge
  updating local tracking ref 'refs/remotes/origin/bridge'
  error: unable to resolve reference refs/remotes/origin/bridge: No error
  error: Cannot lock the ref 'refs/remotes/origin/bridge'.
  Everything up-to-date
  </pre></li>
  </ol>
  
  <p>A screenshot of my git tree is shown by clicking the link below (I need more rep to post a functioning pic):
  <a href="http://i.imgur.com/FN9wHdi.jpg" rel="nofollow">http://i.imgur.com/FN9wHdi.jpg</a></p>
  
  <p>Please let me know if I need to add any other information in the question for it to become better. Thanks so much for your time, even if you just read my problem!</p>