git clone远程特定分支

本文介绍了如何使用Git clone命令来克隆远程仓库的特定分支。内容包括各种选项的用法,如 `-b` 参数用于指定要克隆的分支,以及其他与克隆相关的配置选项,如创建裸仓库、设置进度报告等。



Git clone 命令参数:

使用命令:git  clone -help

  1. $ git clone -help  
  2. usage: git clone [options] [--] <repo> [<dir>]  
  3.   
  4.     -v, --verbose         be more verbose  
  5.     -q, --quiet           be more quiet  
  6.     --progress            force progress reporting  
  7.     -n, --no-checkout     don't create a checkout  
  8.     --bare                create a bare repository  
  9.     --mirror              create a mirror repository (implies bare)  
  10.     -l, --local           to clone from a local repository  
  11.     --no-hardlinks        don't use local hardlinks, always copy  
  12.     -s, --shared          setup as shared repository  
  13.     --recursive           initialize submodules in the clone  
  14.     --recurse-submodules  initialize submodules in the clone  
  15.     --template <template-directory>  
  16.                           directory from which templates will be used  
  17.     --reference <repo>    reference repository  
  18.     -o, --origin <name>   use <name> instead of 'origin' to track upstream  
  19.     -b, --branch <branch>  
  20.                           checkout <branch> instead of the remote's HEAD  
  21.     -u, --upload-pack <path>  
  22.                           path to git-upload-pack on the remote  
  23.     --depth <depth>       create a shallow clone of that depth  
  24.     --single-branch       clone only one branch, HEAD or --branch  
  25.     --separate-git-dir <gitdir>  
  26.                           separate git dir from working tree  
  27.     -c, --config <key=value>  
  28.                           set config inside the new repository  


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值