Git VC 的 TFS 是否将经过身份验证的用户名存储在提交用户名旁边?

Does TFS with Git VC store the authenticated username next to the commit username?

我最近在我的公司介绍了 Git。 Git 允许用户将 user.name 和 user.email 设置为他们想要的任何值。出于审计原因,我需要确定 TFS/Active 目录用户将提交提交到 TFS 本地服务器存储库。 TFS 是否将此信息存储在某处?或者我应该改为引入签名提交?

您要查找的是“pushedBy”字段。当用户设置user.name和user.email时,"author"和"committer"将使用user.name,但"pushedBy"仍然使用TFS/Active目录名。

查看pushBy用户的两种方式:

  1. 转到 Web 门户,select 提交历史记录,您将看到谁推送了此提交。

  1. 使用 TFS Rest Api 到 get a push,然后您将在 Response 中得到 pushBy:

API:

GET http://tfsserver:8080/tfs/CollectionName/_apis/git/repositories/xxxxxxx/pushes/xxx?api-version=1.0