码迷,mamicode.com
首页 > 其他好文 > 详细

怎么从git分支上下载代码

时间:2019-06-17 15:32:57      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:and   rem   git clone   when   命令   远程仓库   The   怎么   分支   

1. 在工作空间,右键,打开Git Bash

 

2. clone主分支的代码(即下载主分支代码的过程)

执行命令: git clone xxx.git


3. 进入工程目录

cd   xxx

 

4.I believe this occurs when you are trying to checkout a remote branch that your local git repo is not aware of yet. Try:

git remote show origin
5.If the remote branch you want to checkout is under “New remote branches” and not “Tracked remote branches” then you need to fetch them first:

git remote update

git fetch  

6 切换到分支并下载代码

git checkout -b 远程仓库分支名字 origin/远程仓库分支名字

git pull

怎么从git分支上下载代码

标签:and   rem   git clone   when   命令   远程仓库   The   怎么   分支   

原文地址:https://www.cnblogs.com/chenzhengwei/p/11039899.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!