所以我是第一次使用 code.google.com,也是第一次使用 git。
我了解如何为开发目的创建克隆,但我如何只 git 存储库的最新快照(HEAD?)?
这里的用例是:我在一个系统上进行开发,我构建另一个系统进行测试(或者我让其他人进行测试)。我只想获取这个新系统上最近提交的文件。
最佳答案
然后使用 git clone
只克隆一个修订版。像这样:
git clone --depth 1 <clone URL>
--depth 1
告诉 git 只获取 HEAD
。
来自git help clone
:
--depth <depth>
Create a shallow clone with a history truncated to the specified number of revisions.
...
关于git - 如何获取谷歌代码存储库的最新快照(不是克隆),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24577501/