title: How can I convert all the remote branches in a local git repo into local tracking branches
body: <p>How can I convert all the remote branches in a local git repo into local tracking branches, without one by one checking each one out.</p>
  
  <p>One reason why you might want to do this (the reason I want to do this) is so that you can take a clone of the local repo and have in that new clone all the branches from the original remote origin.</p>
  
  <p>Because "clone" only clones local branches.  </p>
  
  <p>Edit: a couple of scripted answers have been provided (for which - thanks!) ... I was really hoping for an in-git way, so that it is completely portable (I have users who are "windows only", and so far have survived without having to use a bash (git-bash or otherwise)).</p>