我如何查看特定日期的所有提交? [英] How do I view all commits for a specific day?

查看:364
本文介绍了我如何查看特定日期的所有提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经查看了 git-scm.com gitref.org ,但我似乎无法弄清楚。



假设我想在2013年11月12日星期二获得所有提交。以现有的回购为例,我知道我已经承诺一天,以及之前和之后的一天。

随着 2013-11-11 2013-11-12 $ b pre

$ ul






$
  • git log --after =2013-11-11--until =2013-11-12

  • git log --since =2013-11-11--until =2013-11-12

  • git log --after =2013-11-11--before =2013-11-12

  • git log --since =2013-11-11--before =2013-11-12



  • 仅限于 2013-11-12



    以下所有内容均不提供任何提交:


    • git log --since =2013-11-12--until =2013-11- 12

    • git log --since =2013-11-12--before =2013-11-12

    • git log --after =2013-11-12--until =2013-11-12

    • git log --after =2013-11-12--before =2013-11-12


      随着 2013-11-12 2013-11-13



      正如预期的(从 2013-11- 11 2013-11-12 以上),以下所有内容均为11月12日和13日的结果:




      • git log --since =2013-11-12--before =2013-11-13

      • git log --after =2013-11-12--before =2013-11-13

      • git log --since =2013-11-12--until =2013-11-13

      • git log --after =2013-11-12--before =2013-11-13



      ...等等等等。我觉得自从,之后,,, code>和直到,但仍然找不到答案,也不理解这些选项是包含性还是排他性的,因为它们似乎是包含性的,两个日期是不同的,但如果他们在同一天是独家的。我错过了什么/我做错了什么?! 全部承诺为特定日#comment29756543_19987099>感谢约翰巴塞洛缪!



      答案是指定时间,例如 git log --after =2013-11-12 00:00--before =2013-11-12 23:59


      I've already looked at the relevant docs from git-scm.com and gitref.org, but I can't seem to figure this out.

      Let's say I want to get all commits for Tuesday, November 12th, 2013. Using an existing repo as an example, I know for a fact that I have commits on that day, as well as commits the day before and the day after.

      With 2013-11-11 and 2013-11-12

      All the following give me commits for both November 11th and 12th:

      • git log --after="2013-11-11" --until="2013-11-12"
      • git log --since="2013-11-11" --until="2013-11-12"
      • git log --after="2013-11-11" --before="2013-11-12"
      • git log --since="2013-11-11" --before="2013-11-12"

      With 2013-11-12 only

      All the following give me no commits:

      • git log --since="2013-11-12" --until="2013-11-12"
      • git log --since="2013-11-12" --before="2013-11-12"
      • git log --after="2013-11-12" --until="2013-11-12"
      • git log --after="2013-11-12" --before="2013-11-12"

      With 2013-11-12 and 2013-11-13

      As expected (from the results of 2013-11-11 and 2013-11-12 above), all of the following give me results from both November 12th and 13th:

      • git log --since="2013-11-12" --before="2013-11-13"
      • git log --after="2013-11-12" --before="2013-11-13"
      • git log --since="2013-11-12" --until="2013-11-13"
      • git log --after="2013-11-12" --before="2013-11-13"

      ...and so on and so forth. I feel like I've tried every possible combination of since, after, before, and until but still can't find the answer, nor do I understand whether those options are inclusive or exclusive, since they seem to be inclusive if the two dates are different, but exclusive if they're on the same day. Did I miss something / what am I doing wrong?!

      解决方案

      Thanks John Bartholomew!

      The answer is to specify the time, e.g. git log --after="2013-11-12 00:00" --before="2013-11-12 23:59"

      这篇关于我如何查看特定日期的所有提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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