← Back to Git Course | Chapter 10: Tools & Internals | Lesson 3 of 8

Git IntelliJ Integration

IntelliJ's Git support is like having a built-in helper in your coding workshop that watches your changes and lets you save them without leaving the room.

IntelliJ Git Integration

JetBrains IntelliJ IDEA features built-in Git integration. When you open a Git project, IntelliJ automatically indexes changes, highlights modified files in blue, and untracked files in green inside the Project panel.

Example: IntelliJ Git Integration

bash
# Open a Git project; IntelliJ highlights modified files in blue and untracked files in green

Committing and Pushing

Use the Commit tool window (Cmd+K on macOS, Ctrl+K on Windows) to stage files and write messages. Use the Push dialog (Cmd+Shift+K or Ctrl+Shift+K) to send commits to your remote server.

Example: Committing and Pushing

bash
# Cmd+K (Ctrl+K) opens Commit; Cmd+Shift+K (Ctrl+Shift+K) opens Push

Managing Branches in IntelliJ

The branch indicator in IntelliJ's status bar opens a popup listing local and remote branches together — from there you can check one out, create a new one from your current commit, or merge another branch into your current one, all without touching the terminal.

Example: Managing Branches in IntelliJ

bash
# Click the branch indicator in the status bar to checkout, create, or merge a branch

Viewing Local History

IntelliJ features an independent Local History safety net. If you delete code before committing, right-click the file and select Local History to restore previous, unsaved file states easily.

Example: Viewing Local History

bash
# Right-click a file, select Local History, to restore a previous unsaved state

Visual Git Log

The Git tab at the bottom of the editor window displays a complete visual log. It lists all branches, commit authors, hashes, and detailed file modification structures inside a clean interactive grid.

Example: Visual Git Log

bash
# Open the Git tab to see branches, authors, hashes, and file modifications in a grid
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
Common Mistakes
  1. Leaving files unchecked in the Commit window and then wondering why the change is missing from the commit.
  2. Clicking Commit instead of Commit and Push and expecting the change to be on the remote.
  3. Ignoring the .idea/ folder, and committing IDE settings that belong in .gitignore.

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.