 <p>A local branch can only track a remote branch for pushing if the local and remote branches have the same name. For pulling, the local branch need not have the same name as the remote branch. Interestingly, if you setup a branch 'foo' to track a remote branch 'origin/bar' (with 'git branch foo origin/bar') and if the remote repository <strong>does not</strong> currently have a branch named 'foo', then if later the remote does get a branch named foo, then the local branch foo will track origin/foo thereafter!</p> <pre><code>$ git clone dev1 dev2 Cloning into 'dev2'... done. $ cd dev2 # # After clone, local master tracks remote master. # $ git remote show origin * remote origin Fetch URL: /Users/ebg/dev1 Push URL: /Users/ebg/dev1 HEAD branch: master Remote branch: master tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) # # Create branch br1 to track origin/master # $ git branch br1 origin/master Branch br1 set up to track remote branch master from origin. # # br1 tracks origin/master for pulling, not pushing # $ git remote show origin * remote origin Fetch URL: /Users/ebg/dev1 Push URL: /Users/ebg/dev1 HEAD branch: master Remote branch: master tracked Local branches configured for 'git pull': br1 merges with remote master master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) # # Go to the origin repo and now create a new 'br1' branch # $ cd ../dev1 $ git checkout -b br1 Switched to a new branch 'br1' # # Go back to dev2, fetch origin # $ cd ../dev2 $ git fetch origin From /Users/ebg/dev1 * [new branch] br1 -&gt; origin/br1 # # Now local branch 'br1' is tracking origin/br1 for pushing # $ git remote show origin * remote origin Fetch URL: /Users/ebg/dev1 Push URL: /Users/ebg/dev1 HEAD branch (remote HEAD is ambiguous, may be one of the following): br1 master Remote branches: br1 tracked master tracked Local branches configured for 'git pull': br1 merges with remote master master merges with remote master Local refs configured for 'git push': br1 pushes to br1 (up to date) master pushes to master (up to date) </code></pre> <p>So br1 was originally supposed to pull/push from master and we end up with br1 pulling from origin/master and pushing to a branch we never knew existed.</p>