如何使用特定的annotated git-tag ( tagged-date )创建tagger-name
文档如何使它正确,没有这样的信息。
来自另一个堆栈溢出问题:
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git tag <tag-name> [commit]
git push origin <tag-name>我必须重新定义全局配置设置--这显然不是一个好方法。
发布于 2021-03-30 09:09:08
简单的CORRECT解决方案是:
$ git mktag <tag-file >output标记-文件:
object <HASH> # hash of the commit we are want to set tag to
type commit
tag <NAME> # name of the tag
tagger Bob Dylan <bob.dylan@boby.com> 1484015966 +0000
Message输出:
<HASH> # hash of the created tag后:
$ git update-ref refs/tags/<NAME of the created tag> <the HASH from output file>发布于 2021-03-26 14:52:26
带注释的标记非常类似于提交,因此git commit的方法适用于git tag -a。
GIT_COMMITTER_DATE和GIT_AUTHOR_DATE环境变量。git -c config_key=config.value因此,您可以执行的命令是:
GIT_COMMITTER_DATE="1970-01-01T00:00:00Z" \
GIT_AUTHOR_DATE="1970-01-01T00:00:00Z" \
git -c user.name='Jeff Atwood' \
-c user.email=atwood@stackoverflow.com \
tag -a 1234abchttps://stackoverflow.com/questions/66818804
复制相似问题