title: How do I get a remote tracking branch to stay up to date with remote origin in a bare Git repository?
body: <p>I am trying to maintain a bare copy of a Git repository and having some issues keeping the remote tracking branches up to date. I create the remote tracking branches like this:</p>
  
  <pre><code>git branch -t 0.1 origin/0.1
  </code></pre>
  
  <p>This seems to do what I need to do for that point in time. However, if I make changes to <code>origin</code> and then fetch with the bare repo, things start to fall apart. My workflow looks like this:</p>
  
  <pre><code>git fetch origin
  </code></pre>
  
  <p>It looks like all of the commits come in at that point, but my local copy of 0.1 is not being updated. I can see that the changes have been brought into the repository by doing the following:</p>
  
  <pre><code>git diff 0.1 refs/remotes/origin/0.1
  </code></pre>
  
  <p>What do I need to do to get my tracking branch updated with the remote's updates? I feel like I must be missing a step or a flag somewhere.</p>
  
  <p><strong>Updated: Additional Clarification</strong></p>
  
  <blockquote>
    <p>Normally one would push into a bare repository, rather than run git fetch from within it. If you can arrange to do that, life will be much easier.</p>
  </blockquote>
  
  <p>Here is a bit of clarification on the workflow.</p>
  
  <p>The project's public git repository is hosted on GitHub. I am managing the project (wiki, issues, forums) using Redmine. Redmine requires a local bare repository in order to operate. When GitHub receives changes it pings Redmine. Redmine then attempts to fetch changes from its origin (GitHub).</p>
  
  <p>This works great if I'm just working with master but it was not working with my tracking branches. The changes were being imported but were not being listed in the branch in Redmine repository browser because the local branches were not being updated.</p>
  
  <p>I'm sure I could have worked this out another way but finding a (generic) solution to getting the tracking branches up and running was definitely my preference as most of the git related plugins for Redmine assume things like "git fetch origin" is all that needs to be done.</p>
  
  <p>See accepted answer for the complete solution. The <code>--mirror</code> solution seems to be exactly what is needed in this case.</p>