How to 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 skeleton master branch, and I can push and