IntelliJ IDEA: How to see Git Blame

Life-is-short--so--enjoy-it
3 min readNov 24, 2022

It’s one of ways to see the change history of files inline

IntelliJ IDEA: How to see Git Blame inline?

Intro

When exploring open source — Apache Hudi, I was curious when / which commits add certain lines.

How to see the commits inline?

There are two ways of seeing the commits inline ( the latest commits that made the change ).

  1. By adding Git Blame annotation
  2. By installing GitToolBox plugin

Option 1: By adding Git Blame annotation

It’s three steps.

  1. click ( or select ) the file you’d like to see the git blame in Project Structure.
  2. Right-Click on the file you selected. Then, you will see a pop-up window. ( Image 1 )
  3. Look for “Git” option and select it. Then, you will see another pop-up window. Look for “Annotate with Git Blame” and check the option. ( Image 2 )
  4. You can see the Git Blame annotation on the file you selected. ( Image 3 )
IntelliJ IDEA: how to see menu for a file
IntelliJ IDEA: Git Annotate with Git Blame
IntelliJ IDEA: Git Blame Annotation

Option 2: By installing GitToolBox plugin

The option 1 might require the steps for every file you’d like to see the Git Blame.

Using GitToolBox might be easier way ( Athought it might use little more computer resource ) than the option 1.

Install GitToolBox ( ⌘ , )

  1. go to plugin menu by using the shortcut key ( ⌘ , )
  2. Install GitToolBox
  3. Restart IDE

Set “Show Editor Inline Blame” ( ⌘ , )

  1. go to plugin menu by using the shortcut key ( ⌘ , )
  2. make sure the “Show editor inline Blame” is marked.
IntelliJ IDEA: GitToolBox setting
IntelliJ IDEA: Inline Git Blame by GitToolBox

References

--

--

Life-is-short--so--enjoy-it

Gatsby Lee | Data Engineer | City Farmer | Philosopher | Lexus GX460 Owner | Overlander