- Qt Creator Documentation
- git blame
- Qt Creator 20.0.0

git amend ◦ git branch

# git blame

By default, each line is annotated in the editor when you move the cursor through a file. Hover over the annotation to view commit details and to apply actions to the commit.

Instant blame in the code editor

When you hover over the annotation, a tooltip with additional information is shown. From the tooltip, several actions are available. For more information, see Show instant blame.

## Hide blame in the editor

To hide blame in the editor, go to Preferences > Version Control > Git and clear Instant Blame. For more information, see Instant blame settings.

When instant blame is off, you can go to Tools > Git > Current File > Instant Blame to view blame for the current line.

## View blame for the whole file

To view blame for all lines in the file in the Git Blame view, go to Tools > Git > Current File and select Blame for <file>. Before each line, you can see the identifier of the commit it originates from.

Git Blame view

- To hide the path information in the view, select Omit Path.
- To hide the author information in the view, select Omit Author.
- To hide the date and time information in the view, select Omit Date.
- To find the commit that introduced the last real code change, select Ignore Whitespace.
- To find the commit that introduced a line before it was moved, select No Move Detection. To view moved or copied lines within a file or between files, select Detect Moves Within File, Detect Moves Between Files, or Detect Moves and Copies Between Files.
- To rescan the files, select (Reload).

Select the commit identifier to show a detailed description of the change in the Git Show view.

Right-click the commit identifier to apply other actions to the commit, such as cherry-pick, checkout, or revert it.

## View blame in previous versions

To show the annotation of a previous version, right-click the commit identifier and select Blame Parent Revision. This allows you to navigate through the history of the file and obtain previous versions of it.

See also How to: Use Git, Show instant blame, and Using Git.

git amend ◦ git branch