title: Git - Change tracking configuration of branches
body: <p>I have the following branches (local and remote):</p>
  
  <pre><code>origin/master
  origin/alter
  origin/alter_old
  master
  alter
  alter_old
  </code></pre>
  
  <p>If I do <code>git branch -vv</code> I get:</p>
  
  <pre><code>master     6aec3b5 [origin/master] blam
  alter      8c32a03 blaa1
  alter_old  1669af7 [origin/alter: ahead N, behind M] blaa2
  </code></pre>
  
  <p>I want <code>alter</code> to track <code>origin/alter</code> and <code>alter_old</code> to track <code>origin/alter_old</code>. How can I do it? I tried the following:</p>
  
  <pre><code>git checkout alter_old
  git branch -u origin/alter_old
  </code></pre>
  
  <p>but I get:</p>
  
  <pre><code>error: unknown switch `u'
  </code></pre>
  
  <p>And the same for <code>--set-upstream-to</code>.</p>
  
  <p>EDIT: Strangely, I think that when I push, <code>alter</code>pushes into <code>origin/master</code> and <code>alter_old</code> pushed to <code>origin/alter_old</code>. Why is this?</p>