How do I clone a single branch in Git?
问题 I have a local Git repository called 'skeleton' that I use for storing project skeletons. It has a few branches, for different kinds of projects: casey@agave [~/Projects/skeleton] git branch * master rails c c++ If I want to check out the master branch for a new project, I can do casey@agave [~/Projects] git clone skeleton new Initialized empty Git repository in /Users/casey/Projects/new/.git/ and everything is how I want it. Specifically, the new master branch points to the skeleton master