title: What exactly does the "u" do? "git push -u origin master" vs "git push origin master"
body: <p>I'm apparently terrible at using git, despite my best attempts to understand it. </p>
  
  <p>From <a href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">kernel.org</a> for <code>git push</code>:</p>
  
  <blockquote>
    <p>-u</p>
    
    <p>--set-upstream</p>
    
    <p>For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands. For more information, see <code>branch.&lt;name&gt;.merge</code> in git-config(1).</p>
  </blockquote>
  
  <p>Here's <code>branch.&lt;name&gt;.merge</code> from <code>git config</code>:</p>
  
  <blockquote>
    <p><code>branch.&lt;name&gt;.merge</code></p>
    
    <p>Defines, together with <code>branch.&lt;name&gt;.remote</code>, the upstream branch for the given branch. It tells git fetch/git pull which branch to merge and can also affect git push (see push.default). When in branch <code>&lt;name&gt;</code>, it tells git fetch the default refspec to be marked for merging in FETCH_HEAD. The value is handled like the remote part of a refspec, and must match a ref which is fetched from the remote given by <code>"branch.&lt;name&gt;.remote"</code>. The merge information is used by git pull (which at first calls git fetch) to lookup the default branch for merging. Without this option, git pull defaults to merge the first refspec fetched. Specify multiple values to get an octopus merge. If you wish to setup git pull so that it merges into <code>&lt;name&gt;</code> from another branch in the local repository, you can point <code>branch.&lt;name&gt;.merge</code> to the desired branch, and use the special setting . (a period) for <code>branch.&lt;name&gt;.remote</code>.</p>
  </blockquote>
  
  <p>I successfully set up a remote repository with github, and I successfully pushed my first commit to it with:</p>
  
  <pre><code>git push -u origin master
  </code></pre>
  
  <p>Then, I unwittingly successfully pushed my second commit to my remote repository using:</p>
  
  <pre><code>git commit -m '[...]'
  </code></pre>
  
  <p>However, incorrectly thinking I would have to push again to <code>origin</code> from <code>master</code>, I ran:</p>
  
  <pre><code># note: no -u
  git push origin master
  </code></pre>
  
  <p>What did that do? It didn't seem to have any effect at all. Did I "undo" <code>git push -u origin master</code>?</p>