項目代碼克隆島本地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