Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut for small git diff popup as seen when clicked on the gutter marker?

I sometimes want to see the diff of what has changed only per line, but I find it uncomfortable to always move your hand to the mouse and click on the gutter marker. Is there a way to assign a shortcut to open that little diff window (as seen in the image)? I couldn't find an IntelliJ action that opens it.

small IntelliJ per line diff window

like image 995
dnl.re Avatar asked Sep 19 '25 17:09

dnl.re


1 Answers

That action is called Change Under Caret.

By default, no shortcut is assigned to it. You can find it with Find Action (Ctrl+Shift+A | ⇧⌘A).

Find Action - Change Under Caret

You can also assign a shortcut to it right in this popup with Alt+Enter | ⌥⏎.


Other useful shortcuts:

  • Next Change: Ctrl+Alt+Shift+Down | ⌃⌥⇧↓
  • Previous Change: Ctrl+Alt+Shift+Up | ⌃⌥⇧↑
  • Rollback Lines: Ctrl+Alt+Z | ⌥⌘Z

Help documentation:

  • Review changes - Track changes to a file in the editor
  • Source code navigation - Navigate between changes
  • Undo changes in Git repository - Revert uncommitted changes
like image 81
Pang Avatar answered Sep 21 '25 11:09

Pang