Git 克隆特定分支
例子
要克隆存储库的特定分支,请在存储--branch<branchname>库URL之前键入:
git clone --branch <branch name> <url> [directory]
要为其使用简写选项--branch,请键入-b。此命令下载整个存储库并签出<branchname>。
为了节省磁盘空间,您可以使用以下命令克隆仅导致单个分支的历史记录:
git clone --branch <branch_name> --single-branch <url> [directory]
如果--single-branch未添加到命令中,则所有分支的历史记录将被克隆到中[directory]。大型存储库可能会出现此问题。
要稍后撤消--single-branch标志并获取存储库的其余部分,请使用命令:
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" git fetch origin
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下