doc/user/project/repository/files/git_blame.md
{{< details >}}
{{< /details >}}
Git blame provides more information about every line in a file, including the last modified time, author, and commit hash.
{{< history >}}
inline_blame. Disabled by default.{{< /history >}}
Prerequisites:
git blame results for text
files like .rb, .js, .md, .txt, .yml, and similar formats. Binary files, such as images
and PDFs, are not supported.To view the blame for a file:
When you select Blame, this information is displayed:
To see the precise date and time of the commit, hover over the date. To display a color legend for commit age, see Show age indicator legend.
To see earlier revisions of a specific line:
{{< history >}}
blame_ignore_revs. Disabled by default.blame_ignore_revs removed.{{< /history >}}
To configure Git blame to ignore specific revisions:
In the root of your repository, create a .git-blame-ignore-revs file.
Add the commit hashes you want to ignore, one per line. For example:
a24cb33c0e1390b0719e9d9a4a4fc0e4a3a069cc
676c1c7e8b9e2c9c93e4d5266c6f3a50ad602a4c
Open a file in the blame view.
Select Blame preferences ({{< icon name="preferences" >}}).
Select the Ignore specific revisions checkbox.
The blame view refreshes and skips the revisions specified in the .git-blame-ignore-revs file,
showing the previous meaningful changes instead.
{{< history >}}
{{< /history >}}
In the inline blame view, you can show or hide the age indicator legend. The legend displays a color scale from Newer to Older to help you interpret the age of each commit.
To show or hide the age indicator legend: