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

git开发中常用命令

时间:2019-05-06 18:50:01      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:git clone   项目   指定   分支   fast   常用   git   nbsp   地址   

项目代码克隆岛本地

git clone 项目地址
#如:git clone http://cngit.fir.ai/data_service/distributedstorage.git

克隆指定分支的代码

git clone -b 分支名 项目url  
#如:git clone -b fastdfs-dev http://cngit.fir.ai/data_service/distributedstorage.git

查看当前项目所在的分支

git branch     #查看本地分支
#(storage) shl@shl-pc:~/distributedstorage$ git branch
#* fastdfs-dev

git branch -a   #查看远程分支

项目切换到指定的分支

git checkout -b v1 origin/v1

切换回master分支

git checkout master

 

git开发中常用命令

标签:git clone   项目   指定   分支   fast   常用   git   nbsp   地址   

原文地址:https://www.cnblogs.com/sui776265233/p/10821310.html

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