3 ms·
> Am I missing something? Yes. In git you can also do 'git add -p', which lets you interactively add pieces of a diff to the index, not just entire files. Now
by wtetzner 15y ago
> Am I missing something?
Yes. In git you can also do 'git add -p', which lets you interactively add pieces of a diff to the index, not just entire files.
Now, you could imagine an interface where you interactively select the pieces of the diff when committing, and I believe some VCSs do this. So, even though you were missing something, you weren't necessarily wrong. :)
But having the index can be useful if you want to build up the things you're going to commit over separate 'git add -p' sessions.
- davvid 15y ago> Now, you could imagine an interface where you interactively select the pieces of the diff when committing There's no need to imagine -- git-gui and git-cola can do this. http://cola.tuxfamily.org/ http://cola.tuxfamily.org/ Click on a modified file, select specific lines from the diff, right-click, and click on "stage selected lines".