是否可以根据日期时间做一个浅的git克隆? [英] Is it possible to do a shallow git clone based on datetime?

查看:435
本文介绍了是否可以根据日期时间做一个浅的git克隆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以通过指定 - 深度标志来做一个浅克隆。但是,这需要一个整数作为它的值。有没有办法与 datetime 有相同的行为?我不希望克隆整个存储库并检查以前的状态。

I know I can do a shallow clone by specifying the --depth flag. However, this takes in an integer as its value. Is there any way to have the identical behavior with a datetime? I do not wish to clone the entire repository and checkout a previous state.

推荐答案

为什么是这样。至少只有Git 2.11(Q4 2016)

Why yes it is. At least only with Git 2.11 (Q4 2016)

请参阅 commit cccf74e 提交079aa97 commit 2997178 提交cdc3727 提交859e5df commit a45a260 commit 269a7a8 提交41da711 提交6d43a0c commit 994c2aa 提交508ea88 提交569e554 commit 3d9ff4d commit 79891cb commit 1dd73e2 commit 0d789a5 commit 45a3e52 commit 3f0f662 commit 7fcbd37 commit 6e414e3 (2016年6月12日)由 Duy Nguyen( pclouds Eric Sunshine( sunshineco Junio C Hamano( gitster

(由 Junio C Hamano - gitster - commit a460ea4 ,10月10日2016)

See commit cccf74e, commit 079aa97, commit 2997178, commit cdc3727, commit 859e5df, commit a45a260, commit 269a7a8, commit 41da711, commit 6d43a0c, commit 994c2aa, commit 508ea88, commit 569e554, commit 3d9ff4d, commit 79891cb, commit 1dd73e2, commit 0d789a5, commit 45a3e52, commit 3f0f662, commit 7fcbd37, commit 6e414e3 (12 Jun 2016) by Nguyễn Thái Ngọc Duy (pclouds).
Helped-by: Duy Nguyen (pclouds), Eric Sunshine (sunshineco), and Junio C Hamano (gitster).
(Merged by Junio C Hamano -- gitster -- in commit a460ea4, 10 Oct 2016)

git clone 现在包括:

git clone now includes:

--shallow-since=<date>:




在指定时间后创建具有历史记录的浅克隆。

Create a shallow clone with a history after the specified time.

这篇关于是否可以根据日期时间做一个浅的git克隆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆