title: What is `git push origin master`? Help with git's refs, heads and remotes
body: <p>I have a question about what <code>git push origin master</code> does:</p>
  
  <ul>
  <li>I know that <code>origin</code> is the remote (aka GitHub)</li>
  <li><code>git push origin master</code> is the same as <code>git push origin master_on_my_machine:master_on_github</code></li>
  </ul>
  
  <p>I don't know if:</p>
  
  <ul>
  <li><code>master_on_my_machine</code> is equal to <code>/refs/heads/master</code></li>
  <li><code>master_of_github</code> is equal to <code>/refs/remotes/origin/master</code></li>
  </ul>
  
  <p>If it's equal, should it be possible to do
  <code>git push origin refs/heads/master:refs/heads/origin/master</code>?</p>
  
  <p>Finally, what I want to do is only type <code>git push</code> and <code>git pull</code> when:</p>
  
  <ul>
  <li>I'm on a master branch</li>
  <li>I want to push and pull from a my_test branch on github, only typing <code>git push</code> and <code>git pull</code>.</li>
  </ul>