1、git clone url
先clone?項目,git?branch?-a?查看所有分支,發(fā)現(xiàn)有多個遠程分支
2、假如想在?remote?分支工作,但是本地還沒有?remote?分支,可以先輸入命令:
git??checkout?,不要按回車鍵,按?Tab?鍵提示
3、執(zhí)行命令:git??checkout??remote?,看結果
Checking?out?files:?100%?(1234/1234),?Done
Switched?to?a?new?branch?‘remote’
Branch?‘remote’?set?up?to?track?remote?branch?‘remote’?from?‘’origin
就是本地?remote?分支對應遠程?remote?分支。
再用 git branch -a 看一下
?文章來源:http://www.zghlxwxcb.cn/news/detail-752492.html
4、當前本地分支就是 remote ,可以修改提交了。?文章來源地址http://www.zghlxwxcb.cn/news/detail-752492.html
到了這里,關于git 遠程多分支,本地如何切換分支的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!