Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




> 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/

Click on a modified file, select specific lines from the diff, right-click, and click on "stage selected lines".




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: