4 ms·
Why wouldn't you use a local branch (or something?) for your ugly commits and then merge everything from that branch into the main shared branch when you're don
by wackget 4y ago
Why wouldn't you use a local branch (or something?) for your ugly commits and then merge everything from that branch into the main shared branch when you're done?
- eru 4y agoBecause that's hard to review. I am doing a lot of exploratory programming and way point commits. I don't need the reviewer to understand all the mistakes I made and bad designs I considered. It's enough work to understand the finished design. As a rule of thumb, every commit that lands in master's history should build and pass tests. So that eg 'git bisect' works. But it's not a good idea to put that same requirement on waypoint commits I make along the way, when exploring.
- __blockcipher__ 4y agoBecause then you're going to merge in the ugly commits and make everyone who needs to look at the history in the future have to work that much harder to understand what's going on.
- eru 4y agoAnd you aren't just making the human's job harder, but also tools like 'git bisect' work better when every commit in master builds and passes tests.