1. Git file blame
原文:https://docs.gitlab.com/ee/user/project/repository/git_blame.html
2. Git file blame
在 GitLab 2.5 中引入
Git blame提供有关文件中每一行的更多信息,包括最后修改时间,作者和提交哈希.
您可以在项目中的每个文件中找到" 责备"按钮.
选择" 责备"按钮时,您会看到一个带有说明信息的屏幕:
如果将鼠标悬停在 UI 中的提交上,您将看到该提交的确切日期和时间.
2.1. Blame previous commit
在 GitLab 12.7 中引入 .
要查看特定行的早期修订,请在此更改之前单击" 查看责备",直到找到您有兴趣查看的更改为止:
2.2. Associated git command
如果从命令行运行git ,则等效命令为git blame <filename> . 例如,如果你想找到blame有关信息README.md在本地目录中的文件,运行以下命令:
git blame README.md 
您将看到类似于以下内容的输出,其中包括 UTC 格式的提交时间:
62e2353a (Achilleas Pipinellis     2019-07-11 14:52:18 +0300   1) [](https://gitlab.com/gitlab-com/gitlab-docs/commits/master)
fb0fc7d6 (Achilleas Pipinellis     2016-11-07 22:21:22 +0100   2)
^764ca75 (Connor Shea              2016-10-05 23:40:24 -0600   3) # GitLab Documentation
^764ca75 (Connor Shea              2016-10-05 23:40:24 -0600   4)
0e62ed6d (Mike Jang                2019-11-26 21:44:53 +0000   5) This project hosts the repository used to generate the GitLab
0e62ed6d (Mike Jang                2019-11-26 21:44:53 +0000   6) documentation website and deployed to https://docs.gitlab.com. It uses the 
2.3. File blame through the API
您也可以通过Git 文件指责 REST API来获取此信息.


