4 ms·
Who said they were unrelated? Sometimes a single commit is the best presentation of a bug fix/feature implementation, sometimes it makes more sense to split the
by nemetroid 6y ago
Who said they were unrelated? Sometimes a single commit is the best presentation of a bug fix/feature implementation, sometimes it makes more sense to split the work into multiple commits.
- DJHenk 6y agoI can understand that. But in my mind, if things are separate enough that I want multiple commits, then I would work on them separately. If a feature needs A, but A needs B, then I would work on B, commit that and only then work on A. Sometimes working on A will cause me to change the committed B part a little, but that's fine. At the moment in time that I committed B it was a perfectly reasonable solution that I can revert back to. You know what, typing it out I can totally see why people do it the other way. A matter of personal preference probably.
- Cogito 6y agoFor me, I often don't know exactly how I am going to do something until I have done it. Once it's done I will split the changes into commits that make logical sense, for someone wondering how the new code changes the behaviour of the existing code.