Forrest logo
back to the git tool

git-blame:tldr:0b36c

git-blame: Print file with author email and commit hash on each line.
$ git blame -e ${filename}
try on your machine

The command "git blame -e ${filename}" is used to display the commit history and authorship details of each line in a specific file.

Here's a breakdown of the command:

  • "git blame" is a Git command that shows the last commit and its author for each line in a file.
  • "-e" is an optional flag that stands for "email". It tells Git to display the author's email along with their name in the output.
  • "${filename}" is a placeholder that should be replaced with the actual name or path of the file you want to inspect.

When you run this command, Git will generate a line-by-line listing of the file, indicating the commit hash, author's name, and optionally their email, for each line. This information helps you identify who made changes to the file and when those changes were made.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the git tool