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?

1
4 comments

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.

 

0

Thanks for clarification! Feel  free to create feature request on YouTrack: http://youtrack.jetbrains.com/issues/IDEA.

0

Currently, it is possible to commit individual chanks.

For committing individual lines - see/vote for https://youtrack.jetbrains.com/issue/IDEA-186988

0

Please sign in to leave a comment.