title: Git pull origin HEAD
body: <p>I was taught that you could push to and pull from a remote branch matching the name of your current Git branch by doing:</p>
  
  <pre><code>git push origin HEAD
  </code></pre>
  
  <p>or</p>
  
  <pre><code>git pull origin HEAD
  </code></pre>
  
  <p>Its always worked for me before, but it strangely doesn't work sometimes, instead deferring to push/pulling from the <strong>master</strong> branch instead (which causes a merge on pull... not what I want to do). I know that you can easily push/pull from the branch you're on by simply using the name of the branch like:</p>
  
  <pre><code>git pull origin name-of-branch-i-want-to-pull-from
  </code></pre>
  
  <p><strong>Anyway</strong>:</p>
  
  <ol>
  <li>Is there some reason that the HEAD is losing track/not pointing to my current branch, like it almost always does?</li>
  <li>Is there any way to push/pull to the branch that I'm currently working on (as long as the remote branch's name matches) without explicitly naming the branch in the command?</li>
  </ol>