4 ms·
> Git actually enables this, because you get to pick and choose what to add to the index (`git add`) before committing. That assumes the changes are in separat
by Wowfunhappy 6y ago
> Git actually enables this, because you get to pick and choose what to add to the index (`git add`) before committing.
That assumes the changes are in separate files though, right? I know you can do use the "-i" flag, but it's fairly labor intensive.
- gmfawcett 6y agoThat kind of depends on your tooling. e.g., I use Magit (an Emacs front-end for git) which makes interactive mode really, really easy. (But easy or not, other version control systems such as Subversion don't offer the feature at all. We kind of take Git for granted these days, but it wasn't always like that.)
- foldr 6y agoA lighter weight option is the --patch flag to 'git add' and 'git commit'.
- account42 6y agoPersonally I have gotten used to using `git commit --patch` for everything (even if I only have one change) just as a convenient way of reviewing the changes I am about to commit. With that, only committing part of the changes is no additional effort.