Or maybe it's another weird pun on 404 Not Found? I can't tell by now...
Or maybe it's another weird pun on 404 Not Found? I can't tell by now...
I don't code linearly like "first I need feature A, then I code feature B which is needed for feature C, and so on"
It's usually a bit all over the place and it's not clear what depends on what until I start reaching the end.
So to do this properly I'd need to spend a day or two rewriting or making a new branch that cleanly adds everything in order. Hopefully in a way that doesn't leave master in a broken state when reverting tail commits.
In addition, when doing multiple pull requests for a single high level feature, you might get some comments about pull request "C" that would require changes in pull request "A"
I normally go through every single individual commit when reviewing something and find the commit messages extremely helpful to understand what some change is supposed to do.
Yes, cleaning up your commits takes some time butt I don't see an alternative if you don't work alone and want your code to stay maintainable.
If the commit is wrong, it shouldn't be there. I expect every commit in a Pull Request to be functional on its own or I am not going to approve it in the first place. Git has tools to rewrite your commit history and you should use them.
The whole point is that I should be able to revert individual commits without code breaking. At least that is the ideal. A clean version history matters a lot of the people maintaining your code down the line.
I think what you say is definitely the goal for day-to-day contributions.
However, there are changes to a code base that are more "Manhattan project" in nature where not all changes can be neatly packaged into their own commits, OR the PR author kind of needs to re-do their coding on a clean room branch. Which is significant overhead.
Being able to undo a commit is a means to an end, not the ultimative goal.
That's what a DVCS like git makes easy to do, it's really worth learning.