Is it possible to split a diff item into multiple items
Answered
Consider the image below. Intellij has grouped this change into one single diff item. The "puts" line is just being used for diagnostic, and I don't want to commit this to my final changes. If I'm working on a large feature with lots of situations like this, it would be useful if I could separate out the useful code from the diagnostic code, so that when it comes to committing my changes, I can just commit the changeset of productive code, and then shelve/revert/do whatever with the diagnostic stuff.
Is there a way to do this?

Please sign in to leave a comment.
Hello,
It's possible to use partial commit feature: https://blog.jetbrains.com/idea/2018/02/intellij-idea-2018-1-eap-partial-git-commits-and-more/
Hi Yaroslav, thanks for your reply.
Unfortunately for the situation I described, that will not work. It is still treated as one single diff item.
Thanks for clarification! Feel free to create feature request on YouTrack: http://youtrack.jetbrains.com/issues/IDEA.
Currently, it is possible to commit individual chanks.
For committing individual lines - see/vote for https://youtrack.jetbrains.com/issue/IDEA-186988