git log
本身可以正确显示所有追溯到2017年的提交。
$ git log --pretty=format:"%h - %ad: %s" --date=iso --follow Website/Consumer/Integration/Symitar/SymitarManager.ascx.vb
1a3c6a12f94 - 2018-09-04 22:23:43 +0000: Aloha Pacific / Kekaha, OTS - setup new sublender files BugzID: 290945
bb1d88516af - 2018-09-02 17:28:39 +0000: Symitar/AlabamaTeachers: Use correct entity IDs BugzID: 280366
980b3b27dd0 - 2018-09-02 17:22:43 +0000: Symitar/AlabamaTeachers: Hardcode entity IDs for hotfixing BugzID: 280366
d89b81c17f5 - 2018-08-21 22:14:51 +0000: Symitar / North Carolina Community FCU - new client files BugzID: 289842
78f2cd94c88 - 2018-07-23 23:57:25 +0000: Symitar / Our CU - Updated to use correct Lender ID BugzID: 284792
0ddd6f1c553 - 2018-07-23 23:28:23 +0000: Symitar / Our CU - New Client Set Up BugzID: 284792
7762c503a65 - 2018-07-11 17:58:57 +0000: Symitar / Family First of NY FCU - New client setup for Loans; Fixed typo for XA. BugzID: 284785
d451f1da03e - 2018-07-11 00:27:54 +0000: Symitar / Family First of NY FCU - New client setup for XA. BugzID: 284785
aa67549bcc8 - 2018-06-16 00:21:59 +0000: when booking to to core, stop updating member number to consumer user profile if originator is from Guest User
9dff3157603 - 2018-06-14 23:24:50 +0000: Symitar / Belco Community CU - New client setup. BugzID: 278625
23b95301600 - 2018-06-06 17:57:45 +0000: Symitar / Oswego County - fixed missed psLenderID parameter BugzID: 279373
0abeecd1bfe - 2018-06-05 21:26:28 +0000: Symitar / Oswego County FCU - New Client Set Up BugzID: 279373
fd19b93a965 - 2018-06-01 18:28:24 +0000: Symitar / Alabama Teachers FCU - New Client Set Up BugzID: 280366
512ac6c1aea - 2018-04-30 23:21:14 +0000: Symitar - Altana: add core integration files BugzID: 262811
bcb6d02f3f4 - 2018-04-23 21:09:41 +0000: Symitar/BlackHills: Use Symitar entityID BugzID: 269914
83e801987b8 - 2018-04-23 14:04:05 +0000: Symitar / Black Hills FCU - added new client files. BugzID: 269914
f9bc3ead00b - 2018-03-29 01:40:51 +0000: Symitar - Avadian: site build BugzID: 272555
1a1b607aa83 - 2018-02-05 23:37:36 +0000: Symitar - Cardinal community: site build BugzID: 265958
fa865ba1e03 - 2018-02-05 21:52:08 +0000: Symitar - One Nevada: site build BugzID: 258594
18bac793b23 - 2018-01-26 01:34:33 +0000: Symitar/West Virginia Central: site build BugzID: 257648
3b00b5396a3 - 2018-01-12 00:51:40 +0000: Symitar/Langley: Symitar site build for Langley BugzID: 257399
ac202d0bbe0 - 2017-12-30 00:35:08 +0000: symitar/kern schools - KERN_SCHOOLS_SYMITAR_LENDER_ID BugzID: 258454
32b76717919 - 2017-12-20 20:45:22 +0000: symitar/kern schoools - create loans/XA files BugzID: 258454
b28ad3311dc - 2017-10-12 23:32:03 +0000: Symitar / McGraw Hill FCU - New client file setup. BugzID: 253107
20c4cdd9a13 - 2017-08-28 16:54:28 +0000: Remove debug code. BugzID: 247618
......
$
但是,如果我使用git log --after='2018-01-01'
,则输出在2018-02-05和2018-01-12之间没有提交。
$ git log --pretty=format:"%h - %ad: %s" --after='2018-01-01' --date=iso --follow Website/Consumer/Integration/Symitar/SymitarManager.ascx.vb
1a3c6a12f94 - 2018-09-04 22:23:43 +0000: Aloha Pacific / Kekaha, OTS - setup new sublender files BugzID: 290945
bb1d88516af - 2018-09-02 17:28:39 +0000: Symitar/AlabamaTeachers: Use correct entity IDs BugzID: 280366
980b3b27dd0 - 2018-09-02 17:22:43 +0000: Symitar/AlabamaTeachers: Hardcode entity IDs for hotfixing BugzID: 280366
d89b81c17f5 - 2018-08-21 22:14:51 +0000: Symitar / North Carolina Community FCU - new client files BugzID: 289842
78f2cd94c88 - 2018-07-23 23:57:25 +0000: Symitar / Our CU - Updated to use correct Lender ID BugzID: 284792
0ddd6f1c553 - 2018-07-23 23:28:23 +0000: Symitar / Our CU - New Client Set Up BugzID: 284792
7762c503a65 - 2018-07-11 17:58:57 +0000: Symitar / Family First of NY FCU - New client setup for Loans; Fixed typo for XA. BugzID: 284785
d451f1da03e - 2018-07-11 00:27:54 +0000: Symitar / Family First of NY FCU - New client setup for XA. BugzID: 284785
aa67549bcc8 - 2018-06-16 00:21:59 +0000: when booking to to core, stop updating member number to consumer user profile if originator is from Guest User
9dff3157603 - 2018-06-14 23:24:50 +0000: Symitar / Belco Community CU - New client setup. BugzID: 278625
23b95301600 - 2018-06-06 17:57:45 +0000: Symitar / Oswego County - fixed missed psLenderID parameter BugzID: 279373
0abeecd1bfe - 2018-06-05 21:26:28 +0000: Symitar / Oswego County FCU - New Client Set Up BugzID: 279373
fd19b93a965 - 2018-06-01 18:28:24 +0000: Symitar / Alabama Teachers FCU - New Client Set Up BugzID: 280366
512ac6c1aea - 2018-04-30 23:21:14 +0000: Symitar - Altana: add core integration files BugzID: 262811
bcb6d02f3f4 - 2018-04-23 21:09:41 +0000: Symitar/BlackHills: Use Symitar entityID BugzID: 269914
83e801987b8 - 2018-04-23 14:04:05 +0000: Symitar / Black Hills FCU - added new client files. BugzID: 269914
f9bc3ead00b - 2018-03-29 01:40:51 +0000: Symitar - Avadian: site build BugzID: 272555
$
git log --since
为什么不起作用?我该如何解决?
更新:
我尝试了格式%cd,该格式显示提交日期。结果是相同的。
$ git log --pretty=format:"%h - %cd: %s" --date=iso --follow Website/Consumer/Integration/Symitar/SymitarManager.ascx.vb
1a3c6a12f94 - 2018-09-04 22:23:43 +0000: Aloha Pacific / Kekaha, OTS - setup new sublender files BugzID: 290945
bb1d88516af - 2018-09-02 17:28:39 +0000: Symitar/AlabamaTeachers: Use correct entity IDs BugzID: 280366
980b3b27dd0 - 2018-09-02 17:22:43 +0000: Symitar/AlabamaTeachers: Hardcode entity IDs for hotfixing BugzID: 280366
d89b81c17f5 - 2018-08-21 22:14:51 +0000: Symitar / North Carolina Community FCU - new client files BugzID: 289842
78f2cd94c88 - 2018-07-23 23:57:25 +0000: Symitar / Our CU - Updated to use correct Lender ID BugzID: 284792
0ddd6f1c553 - 2018-07-23 23:28:23 +0000: Symitar / Our CU - New Client Set Up BugzID: 284792
7762c503a65 - 2018-07-11 17:58:57 +0000: Symitar / Family First of NY FCU - New client setup for Loans; Fixed typo for XA. BugzID: 284785
d451f1da03e - 2018-07-11 00:27:54 +0000: Symitar / Family First of NY FCU - New client setup for XA. BugzID: 284785
aa67549bcc8 - 2018-06-16 00:21:59 +0000: when booking to to core, stop updating member number to consumer user profile if originator is from Guest User
9dff3157603 - 2018-06-14 23:24:50 +0000: Symitar / Belco Community CU - New client setup. BugzID: 278625
23b95301600 - 2018-06-06 17:57:45 +0000: Symitar / Oswego County - fixed missed psLenderID parameter BugzID: 279373
0abeecd1bfe - 2018-06-05 21:26:28 +0000: Symitar / Oswego County FCU - New Client Set Up BugzID: 279373
fd19b93a965 - 2018-06-01 18:28:24 +0000: Symitar / Alabama Teachers FCU - New Client Set Up BugzID: 280366
512ac6c1aea - 2018-04-30 23:21:14 +0000: Symitar - Altana: add core integration files BugzID: 262811
bcb6d02f3f4 - 2018-04-23 21:09:41 +0000: Symitar/BlackHills: Use Symitar entityID BugzID: 269914
83e801987b8 - 2018-04-23 14:04:05 +0000: Symitar / Black Hills FCU - added new client files. BugzID: 269914
f9bc3ead00b - 2018-03-29 01:40:51 +0000: Symitar - Avadian: site build BugzID: 272555
1a1b607aa83 - 2018-02-05 23:37:36 +0000: Symitar - Cardinal community: site build BugzID: 265958
fa865ba1e03 - 2018-02-05 21:52:08 +0000: Symitar - One Nevada: site build BugzID: 258594
18bac793b23 - 2018-01-26 01:34:33 +0000: Symitar/West Virginia Central: site build BugzID: 257648
3b00b5396a3 - 2018-01-12 00:51:40 +0000: Symitar/Langley: Symitar site build for Langley BugzID: 257399
ac202d0bbe0 - 2017-12-30 00:35:08 +0000: symitar/kern schools - KERN_SCHOOLS_SYMITAR_LENDER_ID BugzID: 258454
32b76717919 - 2017-12-20 20:45:22 +0000: symitar/kern schoools - create loans/XA files BugzID: 258454
b28ad3311dc - 2017-10-12 23:32:03 +0000: Symitar / McGraw Hill FCU - New client file setup. BugzID: 253107
20c4cdd9a13 - 2017-08-28 16:54:28 +0000: Remove debug code. BugzID: 247618
4a1cab2e647 - 2017-08-23 23:45:07 +0000: Add debug code BugzID: 247618
...
$
答案 0 :(得分:2)
这里最可能的问题是--since
或--after
测试提交人的日期,而%ad
向您显示作者日期。
通常,提交者日期比提交者日期晚 ,如果两者不同,因为提交者日期将从先前选择的提交中复制而来,该提交是经过精心挑选或以其他方式重新设计的。在这里,作者日期是原始提交的创建时间,而提交者日期是您现在进行的提交的时间。因此%ad
可能会在1月初显示日期,即使提交已在1月或2月下旬完成。
不过,这两个日期可能不同的事实是最有可能导致此问题的原因。要查看是否是这种情况,请使用--pretty=fuller
或类似的命令查看任何“丢失”的提交。您可以使用git show
或git log
进行此操作,例如:
$ git log --no-walk --pretty=fuller | sed 's/@/ /'
commit c05048d43925ab8edcb36663752c2b4541911231
Author: Junio C Hamano <gitster pobox.com>
AuthorDate: Tue Sep 4 14:33:27 2018 -0700
Commit: Junio C Hamano <gitster pobox.com>
CommitDate: Tue Sep 4 14:33:27 2018 -0700
Git 2.19-rc2
Signed-off-by: Junio C Hamano <gitster pobox.com>
在这种情况下,两个日期相同,但是请考虑以下提交:
commit 6c6ce21baa9b50d394bb8ed9878944504ffd57d8
Author: Eric Sunshine <sunshine sunshineco.com>
AuthorDate: Fri Aug 31 04:33:42 2018 -0400
Commit: Junio C Hamano <gitster pobox.com>
CommitDate: Fri Aug 31 12:05:24 2018 -0700
这显示了作者和提交者是具有不同时间戳的不同人。
(没有--since
等效项可以检查作者日期而不是提交者日期。)