Git file blame
Introduced in GitLab 2.5
Git blame provides more information about every line in a file, including the last modified time, author, and commit hash.
You can find the Blame button with each file in a project.
When you select the Blame button, you’ll see a screen with the noted information:
If you hover over a commit in the UI, you’ll see a precise date and time for that commit.
Blame previous commit
Introduced in GitLab 12.7.
To see earlier revisions of a specific line, click View blame prior to this change until you’ve found the changes you’re interested in viewing:
Associated git
command
If you’re running git
from the command line, the equivalent command is
git blame <filename>
. For example, if you want to find blame
information
about a README.md
file in the local directory, run the following command:
git blame README.md
You’ll see output similar to the following, which includes the commit time in UTC format:
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
File blame through the API
You can also get this information over the Git file blame REST API.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc