简体   繁体   English

Git rev-list 命令在不同的时间给出不同的结果

[英]Git rev-list command gives different result on different time

I am running this command on my local git command line (git version 2.0.1) with IST (GMT+5:30) timezone:我正在使用 IST (GMT+5:30) 时区在本地 git 命令行(git 版本 2.0.1)上运行此命令:

git rev-list --after=2016-03-10 --before=2016-03-11 --all --format='%H, %cd, %aE' 

Running this command at different time 9:00 am IST , 1:00 PM IST , 6:00 PM IST gives me different results.9:00 am IST 1:00 PM IST 6:00 PM IST 1:00 PM IST 6:00 PM IST不同时间运行此命令会给我不同的结果。

Can anybody explain how before and after works in git-revlist command?谁能解释一下 git-revlist 命令之前和之后的工作原理?

Apparently git treats "2016-03-10" in date as "2016-03-10 of current time", so it precise meaning depends on when you run it.显然 git 将日期中的“2016-03-10”视为“当前时间的 2016-03-10”,因此其确切含义取决于您何时运行它。 I'm trying it now, at 8:44 local time, and can see for example commit made at 09:32, but not at 08:21我现在正在尝试,在当地时间 8:44,并且可以看到例如在 09:32 进行的提交,但不是在 08:21

To avoid uncertainty, use exact date with time: --after="2016-30-10 00:00:00"为避免不确定性,请使用带有时间的确切日期:--after="2016-30-10 00:00:00"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM