How do I clone a repository with all remotely tracked branches?
Suppose you have a repository configured with several remotes: origin (the default), foreign1, foreign2. You want to do a clone but do not want to set up all foreigns again and still be able to checkout any branch from foreign1 or foreign2 (you have origin for free). There’s a git-clone option –mirror which sets up all remotely tracked branches. So far this is a fundamental knowledge obtained from frequent documentation readings *cough*. But, –mirror also implies –bare option, ie. the clone will will not be created as a working copy and you cannot checkout the branches.