The gitg git gui is written in vala. I've used it for several years because it allows easy staging of individual lines, as well as reverting them.
The gitg git gui is written in vala. I've used it for several years because it allows easy staging of individual lines, as well as reverting them.
I have been looking for this functionality for literally years at this point. Thank you! I will be trying this.
It does indeed have the same functionality as gitg for staging and reverting individual lines. It does have several UI niggles. For example when selecting it does not do so on a line by line basis, but instead character by character. But the operations are line by line, (or hunk). You also can't right click on file names and choose stage, revert, or delete.
While git add -p is in theory doing something similar, it is a lot more painful to use, and you are still working a hunk at a time instead of just scrolling through changes.
I often use this functionality when I've made a number of changes during development and everything is now coherent, especially on a multi-language project. It is then easy to go in and discard lines that were added to debug, and stage lines across multiple commits so they are logically grouped.