【问题标题】:How do I download a specific version of source code from android.googlesourcecode.com using Git?如何使用 Git 从 android.googlesourcecode.com 下载特定版本的源代码?
【发布时间】:2015-07-28 22:39:21
【问题描述】:
【问题讨论】:
标签:
download
android-source
git-clone
【解决方案1】:
所有标签都列在All Tags 下的Calendar page 中。该页面包含android-4.0.3_r1.1。
如果您克隆 repo 并查找该标签,您也会找到它。例如:
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 将允许您浏览该特定标签的来源。