鼻子亲了脸

git clone的多种用法
clone 某个分支#-b:branch(分支) #branch_name:分支名称 #git_address:克...
扫描右侧二维码阅读全文
25
2017/12

git clone的多种用法

clone 某个分支

#-b:branch(分支)
#branch_name:分支名称

#git_address:克隆的地址
git clone -b branch_name git_address
#例子
git clone -b hexo git@github.com:mrdong916/mrdong916.github.io.git

clone 所有分支

#git_address:克隆的地址
git clone git_address
#例子
git clone git@github.com:mrdong916/mrdong916.github.io.git
#查看所有分支
git branch -r
#显示内容
$ git branch -r
  origin/HEAD -> origin/master
  origin/hexo
  origin/master
#切换分支
#branch_name:克隆的分支名称
git checkout branch_name
#例子
git checkout hexo #切换到hexo分支
Last modification:March 18th, 2019 at 04:47 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment