IntelliJ IDEA: How to see Git Blame
3 min readNov 24, 2022
It’s one of ways to see the change history of files 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 ).
- By adding Git Blame annotation
- By installing GitToolBox plugin
Option 1: By adding Git Blame annotation
It’s three steps.
- click ( or select ) the file you’d like to see the git blame in Project Structure.
- Right-Click on the file you selected. Then, you will see a pop-up window. ( Image 1 )
- 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 )
- You can see the Git Blame annotation on the file you selected. ( Image 3 )
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 ( ⌘ , )
- go to plugin menu by using the shortcut key ( ⌘ , )
- Install GitToolBox
- Restart IDE
Set “Show Editor Inline Blame” ( ⌘ , )
- go to plugin menu by using the shortcut key ( ⌘ , )
- make sure the “Show editor inline Blame” is marked.