Limits of partial staging and hunk-level commits in the IntelliJ IDEA Commit dialog
0 reputation · 10 Mar 2020, 12:38 UTC
I am evaluating whether IntelliJ IDEA's built-in Git integration can fully replace a terminal workflow for a team that relies on fine-grained commits. The documented Commit dialog supports staging changes per file and per section, with a diff preview, and the Git tool window handles commit, push, pull, and branch operations.
The uncertainty is around the boundaries of that partial-staging support. Specifically, it is not clear to me whether selecting individual changed lines or hunks in the Commit dialog creates a true partial index (as git add -p would), or whether the IDE emulates it in a way that can diverge from the actual repository index when the same file is also modified from the command line or another tool.
Assume a recent IntelliJ IDEA version with the bundled Git plugin enabled and a standard local repository; edition differences (Community vs. Ultimate) may matter if any of this is gated.
- Does partial (hunk-level) staging in the Commit dialog write to the real Git index, or does the IDE commit via a temporary mechanism that bypasses it?
- Are there documented cases where unselected changes in the same file are still included in the commit?
- Does signed-commit support in the dialog impose constraints (for example on GPG agent configuration) that differ from committing via the Git CLI?