3 ms·
Logical changes aren't necessarily partitioned by file. Very often I find they are not. I might make a feature or fix or cleanup that is say 10 related changes
by throwawaylinux 4y ago
Logical changes aren't necessarily partitioned by file. Very often I find they are not. I might make a feature or fix or cleanup that is say 10 related changes that each affect some subset of say half a dozen files, often even the same code multiple times.
Adding individual files can help partition out some changes, but it's very rare for me, it's much more often I have to go back and manually shuffle sub-file changes around if I didn't get the splits right the first time.
- naavis 4y agoYou could use `git add -p` It lets you stage individual changes inside files instead of the whole file.
- throwawaylinux 4y agoRight, I can do those things and sometimes do. Similarly to per-file I generally don't need to because I try to write and commit a logical change at a time. I have no problem with people who do it some other way, it just seems odd to hear people proclaim a particular way to work with git is wrong, because it does not match how they work. Not sure if it's because they can't imagine any other way of working, or they just think all other ways are also wrong.