2013-04-18 58 views
3

我想從android.googlesourcecode下載標籤中顯示的源代碼。 例如,我想下載日曆代碼如何使用Git從android.googlesourcecode.com下載特定版本的源代碼?

https://android.googlesource.com/platform/packages/apps/Calendar

我也想下載的Android版本特定標籤的代碼。例如,android-4.0.3_r1.1來自以下鏈接

https://android.googlesource.com/platform/packages/apps/Calendar/+/android-4.0.3_r1.1

當我從git repositories瀏覽此代碼時,它不顯示標籤的代碼版本。我該怎麼做呢?

回答

1

所有的標籤都列在Calendar pageAll Tags。該頁面包含android-4.0.3_r1.1

如果您克隆回購並尋找該標籤,您也會發現它。例如:

C:\prog\git>git clone https://android.googlesource.com/platform/packages/apps/Calendar 
Cloning into 'Calendar'... 
remote: Counting objects: 80, done 
remote: Finding sources: 100% (80/80) 
remote: Total 30504 (delta 15730), reused 30504 (delta 15730) 
Receiving objects: 100% (30504/30504), 11.16 MiB | 4.61 MiB/s, done. 
Resolving deltas: 100% (15730/15730), done. 

C:\prog\git>cd Calendar 

C:\prog\git\Calendar>git tag|grep 4.0.3 
android-4.0.3_r1 
android-4.0.3_r1.1 
... 

從那裏,一個簡單的git checkout android-4.0.3_r1.1將允許您瀏覽該特定標籤的來源。