GitFocus

Focus your project tree on what you're actually working on

GitFocus is a plugin for JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, RubyMine, RustRover β€” 2024.2 and newer) that hides what you are not working on. Pick a few commits, directories, or files, and the Project view shows only the files that belong to them. Big project, small task β€” see only the part of the tree the task lives in.

How it works
  1. Enable GitFocus. Nothing is filtered until you do; the switch is off after installation. Off again restores the full tree.
  2. Capture what you're working on β€” select commits in the Git log, or directories and files in the Project view, right-click β†’ GitFocus and add them to a filter. One click adds all your changed (or staged) files, so the view survives the commit.
  3. Look at the Project view. It shows only those files and their directories, plus (by default) your local changes and open tabs β€” each behind its own switch.
  4. Switch views, not setups. One Default Filter plus three named filters: keep one per task or branch, enable several at once for their union, or Use Only This for one of them. Clear Sources empties a filter, Reset Filter returns it to defaults.
Features
Use cases

Focus on a few commits

  1. Open the Git log (Alt+9 / ⌘+9).
  2. Ctrl-click the two or three commits you care about.
  3. Right-click β†’ GitFocus β†’ Set as Default Filter.
  4. Turn on GitFocus β†’ Enable GitFocus.
  5. The Project view now shows only the files those commits touched, plus your local changes and open tabs.

Two branches, two views

  1. Right-click branch feature-a β†’ Use GitFocus Filter for This Branch… and pick a filter; it fills with the commits the branch owns.
  2. Do the same for bugfix-b with another filter.
  3. Check out either branch β€” its view switches on, the other one off. Nothing to rebuild after a checkout.

Run only the visible tests

  1. Focus on the commits or directories you are working on, so the test tree shows only the classes that matter.
  2. Right-click the test directory β†’ Run Focused Tests (or Debug Focused Tests).
  3. Only the visible test classes run β€” not every class that happens to live there.
What's new

Full change notes are on the Marketplace listing.

Compatibility

Works in IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, RubyMine, and RustRover, version 2024.2 and newer. One plugin, every IDE.

Not compatible with Rider, Android Studio, DataGrip, and DataSpell: these IDEs replace or bypass the Project view that GitFocus filters, and the IDE refuses the install at startup with its standard "conflicting module" notice.

Get it from the JetBrains Marketplace, or install it from your IDE: Settings β†’ Plugins β†’ Marketplace β†’ β€œGitFocus”.