當混帳克隆一些版本庫,那麼它會檢索所有分支從中:的Git檢出遠程分支
git clone https://github.com/android/platform_build.git build1
cd build1/ && git branch -a && cd ..
然後,當我使用build1
如鏡和克隆它,我沒有看到它的所有遠程分支機構(我只看到build1
的本地主分支機構)
git clone build1 build2
cd build2 && git branch -a && cd ..
如何結帳遠程分支機構?
我知道我可以檢出所有遠程分支機構build1中鏡子命令
cd build1 && for remote in `git branch -r `; do git branch --track $remote; done
Track all remote git branches as local branches 但是如果我沒有獲得build1中的目錄?
此外,有git ls-remote origin
命令,它顯示所有的遠程參考,但有沒有優雅的方式來檢查遠程分支的遠程?
我可以用'git://'來代替'https://'嗎?提取對於您和服務器來說都更有效率。 – jthill