Git: see only non-staged (rather than non-committed) changes

When working on a large task using Git, it is convenient to stage parts of your work into the staging area with "git add". These partial changes do not constitute a valid commit per se (because a commit should normally leave a project in working state), yet it's often easier to stage the changes incrementally which allows to work with relatively small changesets.

A key point here is that once a part of work is staged, it is gone from the developer's mental context until it's time to finish the actual commit. In particular, "git diff" shows only non-staged changes, and "git checkout" allows to revert to staged version.

Unfortunately, this development approach is not supported by Jetbrains (PyCharm) Git integration. Regardless of whether a change in a file is staged or not, it is still displayed as a change in the editor, leading to mental pollution. Is it possible to improve on this? I realize that VCS integration is universal and the staging area concept is unique to Git and thus it is not supported on generic level. However, what about a simple switch in Git settings like "Compare with: [Last commit/Staging area]"? Moreover, in that case I believe "Compare with: Staging area" should be the default option, repeating "git diff" logic.

Please sign in to leave a comment.