How can I specify which branch should be checked out in a fresh clone?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In Git Extensions, the user can, when cloning a repository, specify which branch (possibly other than master ) should be checked out in the resulting clone. How can I do that at the command line? 回答1: The answer, as often, is in the man pages (in the git-clone man page, here): --branch <name>, -b <name> Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository's HEAD, point to <name> branch instead. In a non-bare repository, this is the branch that will be checked out. --branch can also take tags and