I would like to retain (for now) the ability to link Git changesets to workitems stored in TFS.
(我想保留(暂时)将Git变更集链接到存储在TFS中的工作项的功能。)
I already wrote a tool (using a hook from Git) in which I can inject workitemidentifiers into the message of a Git changeset.
(我已经编写了一个工具(使用Git的钩子),可以在其中将workitemidentifiers插入到Git变更集的消息中。)
However, I would also like to store the identifier of the Git commit (the hash) into a custom TFS workitem field.
(但是,我也想将Git提交的标识符(哈希)存储到自定义TFS工作项字段中。)
This way I can examine a workitem in TFS and see what Git changesets are associated with the workitem. (这样,我可以检查TFS中的工作项,并查看与该工作项相关联的Git变更集。)
How can I easily retrieve the hash from the current commit from Git?
(如何轻松地从Git的当前提交中检索哈希?)
ask by Sardaukar translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…