英文:
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网站检查了提交,但它并没有显示新的日期,仍然显示提交是几分钟前:
英文:
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:
答案1
得分: 0
我认为这与Git提交中的committer
和author
日期有关,例如这些答案指出的情况:
英文:
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:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论