gitclone某个分⽀或者所有分⽀clone 某个分⽀:
clone 所有分⽀:
git  branch -r
git checkout dev5
git clone默认会把远程仓库整个给clone下来;
但只会在本地默认创建⼀个master分⽀
如果远程还有其他的分⽀,此时⽤git branch -a查看所有分⽀:
1. * master
2. remotes/origin/HEAD -> origin/master
3. remotes/origin/master
4. remotes/origin/python_mail.skin
5. remotes/origin/udisk
6. remotes/origin/vip
能看到远程的所有的分⽀,如remotes/origin/python_mail.skin
可以使⽤checkout命令来把远程分⽀取到本地,并⾃动建⽴tracking
1. $ git checkout -b python_mail.skin origin/python_mail.skin
2. Branch python_mail.skin set up to track remote branch python_mail.skin from origin
3. Switched to a new branch 'python_mail.skin'clone
或者使⽤-t参数,它默认会在本地建⽴⼀个和远程分⽀名字⼀样的分⽀
折叠展开复制代码
1. $ git checkout -t origin/python_mail.skin

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。