git开发中经常使用命令

项目代码克隆岛本地git

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

克隆指定分支的代码url

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

查看当前项目所在的分支spa

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

git branch -a   #查看远程分支

项目切换到指定的分支code

git checkout -b v1 origin/v1

切换回master分支blog

git checkout master
相关文章
相关标签/搜索