News for hackers. Stuff that matters.
Re:Git is my buddy: Effective Git as a solo developer by Wowfunhappy on Tuesday February 23, 2021 @05:15PM (#26243640)
> 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.

Re:Git is my buddy: Effective Git as a solo developer by gmfawcett on Tuesday February 23, 2021 @05:27PM (#26243802)
That 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.)

Re:Git is my buddy: Effective Git as a solo developer by foldr on Wednesday February 24, 2021 @04:26AM (#26248191)
A lighter weight option is the --patch flag to 'git add' and 'git commit'.
Re:Git is my buddy: Effective Git as a solo developer by account42 on Wednesday February 24, 2021 @04:33AM (#26248229)
Personally 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.