git - 如何获取谷歌代码存储库的最新快照(不是克隆)

标签 git testing

所以我是第一次使用 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/

相关文章:

git - 如何强制中止或终止 Git rebase

visual-studio - TFS 2010 和/或测试管理器中的测试用例结果列

android - MainCoroutineRule 和 runBlocking 的区别

git - 如何确保我在正确的分支上启动运行?

git - 我怎样才能在使用 git diff 时跳过一些文件?

xcode - 如何获取 Xcode Bot "Run Script"触发器的提交 SHA?在 Github 上更新测试状态

ruby-on-rails - Rails 邮件程序 : change file when delivery_method :file

testing - 使用 Cypress 执行拖放操作

ios - 动态类型和 iOS 模拟器 : How can I set the value?

git - 致命的 : NullReferenceException encountered when interacting with remote