2013-05-06 45 views

回答

8

Git的克隆下載所有的項目,--branch選項:

--branch,-b 取而代之的是新創建的HEAD指向分支指向克隆庫的頭,點 分支代替。在非裸倉庫中,這是將被檢出的分支。

git clone --branch ics-mr1 https://android.googlesource.com/platform/packages/apps/Gallery2 

希望這有助於!

+0

這工作。非常感謝! :) – Avijit 2013-05-07 00:32:59

0

您克隆項目,然後您籤像分支:

git clone https://android.googlesource.com/platform/packages/apps/Gallery2 
cd Gallery2/ 
git checkout ics-mr1 
0

您也可以下載只是一個分支:

git init Gallery2_ics-mr1 
cd Gallery2_ics-mr1 
git remote add origin https://android.googlesource.com/platform/packages/apps/Gallery2 
git fetch -n origin ics-mr1:refs/remotes/origin/ics-mr1 
git checkout origin/ics-mr1 -b ics-mr1 

注意,進一步git pullgit fetch(不帶參數)將取一切從存儲庫中。

相關問題