GitHub不显示修订后的提交日期。

huangapple go评论101阅读模式
英文:

Github doesn't show the amended commit date

问题

I use this command to modify a commit date:

我使用以下命令来修改提交日期:

git commit --date="5 day ago" -m "modifying date"

The following is the result of the command above:

以下是上述命令的结果:

[main 0ab160a] modifying date
Date: Tue May 9 18:59:29 2023 +0300
1 file changed, 1 insertion(+)

I then push the commit using this command:

然后,我使用以下命令推送提交:

git push -f origin main

Result of pushing the commit:

推送提交的结果:

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 267 bytes | 89.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/testings1404/Testings.git
1282afa..0ab160a  main -> main

I checked the commit through the GitHub website and it doesn't show the new date 9th of May. It shows it was committed a few minutes ago:

我通过GitHub网站检查了提交,但它并没有显示新的日期,仍然显示提交是几分钟前:

GitHub不显示修订后的提交日期。

英文:

I use this command to modify a commit date:

 git commit --date="5 day ago" -m "modifying date"

The following is the result of the command above:

 [main 0ab160a] modifying date
 Date: Tue May 9 18:59:29 2023 +0300
 1 file changed, 1 insertion(+)

I then push the commit using this command:

 git push -f origin main

Result of pushing the commit:

 Enumerating objects: 5, done.
 Counting objects: 100% (5/5), done.
 Writing objects: 100% (3/3), 267 bytes | 89.00 KiB/s, done.
 Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
 To https://github.com/testings1404/Testings.git
 1282afa..0ab160a  main -> main

I checked the commit through github website and it doesn't show the new date 9th of may. It shows the it was committed few minutes ago:

GitHub不显示修订后的提交日期。

答案1

得分: 0

我认为这与Git提交中的committerauthor日期有关,例如这些答案指出的情况:

英文:

I think it has something to do with the fact that there are committer and author dates in git commits, as e.g. these answers point out:

huangapple
  • 本文由 发表于 2023年5月15日 00:08:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/76248466.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定