我想知道你过去会如何创建提交?
我已经搜索过了,据我所知可以使用 git commit --date""
如果有人能澄清这一点并举例说明日期格式,我将不胜感激。
最佳答案
例如 --date="Wed Feb 16 14:00 2011 +0100"
来自 kernel.org:
DATE FORMATS
The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables and the
--date
option support the following date formats:Git internal format It is , where is the number of seconds since the UNIX epoch. is a positive or negative offset from UTC. For example CET (which is 2 hours ahead UTC) is +0200.
RFC 2822 The standard email format as described by RFC 2822, for example Thu, 07 Apr 2005 22:13:13 +0200.
ISO 8601 Time and date specified by the ISO 8601 standard, for example 2005-04-07T22:13:13. The parser accepts a space instead of the T character as well.
来源:http://www.kernel.org/pub/software/scm/git/docs/git-commit.html
关于git - 如何创建过去日期的 git 提交?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13339992/