Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is this something missing specifically from IDEA?

In Rider, there are features that allow committing individual lines instead of a whole file. You can select in the commit dialog which lines to include/omit. Also I recommended taking a look at Changelists feature that allows separating certain changes from what would be committed next (I believe it works line by line basis).



I don't know Rider, but I assume this is a limitation in all of their IDEs. Yes, you can commit only certain changes within a file. But you can only do that based on whole chunks. For example, if you add two new lines at the end of an existing file, you cannot commit only one line but not the other. The same limitation applies to changelists (at least in IntelliJ IDEA and Webstorm).


Doesn't this come from git itself? If you try `git add -p <file>`, it'll chunk just as "bad".


Yes, git generally stages just hunks with the patch add mechanism, but it is possible to stage single lines, but it is a bit tedious, see: https://kennyballou.com/blog/2015/10/art-manually-edit-hunks...


You can edit the hunk manually. I believe it's also possible to construct a hunk to apply entirely from scratch as long as you get the header right.


Indeed. That is a limitation with Rider too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: