【问题标题】:Use relative date with git clone --shallow-since使用 git clone --shallow-since 的相对日期
【发布时间】:2021-02-23 17:41:39
【问题描述】:

我可以在git clone--shallow-since=<date> 中使用相对日期吗(例如one-year-ago)?

命令替换(如bashPowerShell 中的$(one-year-ago-command)bash 中的`one-year-ago-command`)不是真正的替代品,因为我正在使用cmdfor /f 是a* *.

【问题讨论】:

    标签: git


    【解决方案1】:

    是的,你可以这样做。它适用于您可以传递给例如相同的<date> 格式。 git log --since=<date>.

    例如:

    git clone --shallow-since="1 week ago" <url>
    

    这适用于 Git 版本 2.20.1。

    另见:

    【讨论】:

      猜你喜欢
      • 2014-07-05
      • 2018-01-06
      • 1970-01-01
      • 2020-11-28
      • 2017-07-17
      • 2019-01-27
      • 2016-08-01
      • 2015-12-18
      相关资源
      最近更新 更多