| So here's the thing: if you are putting more work into rebasing but not getting anything more out of it, you are doing it wrong. You should always do the easiest thing that gets you what you want, otherwise you're just doing pointless work. If you and your colleagues are happy merging and you find that easier, that's what you should be doing. Rebasing supports a totally different workflow. With a rebase I can submit a well-formed set of changes for review that are conflict free. You can't do that with merging. With merging you submit a bunch of crap "history" that nobody will ever look at and the project maintainer has to deal with the conflicts. Merge commits look like this (newest to oldest): * Final tweaks
* Merge master branch
* Implement bar
* Fix foo
* Merge master branch
* Shit I did on Wednesday before lunch
* Implement foo
* End of day
Totally impenetrable mess that nobody will ever look at.Rebased commits look like this: * Add customise option to UI
* Add use case baz
* Extend model to support bar
* Refactor model foo
These can be reviewed in insolation and when approved they merge without conflict.If you want to do this but none of your colleagues are on board and you don't have the swing to make them, then I'm sorry. But you are wasting your time rebasing in that case. :( |
The merge version looks like the way code is actually written in practice to me, so doesn't the rebased version take extra time to create after you're done adding code? E.g. the "Add use case baz" rebase commit isn't likely to be a simple squashing of commits from the merge version, but cherrypicking specific lines from multiple commits.
I fully agree the rebased version is nicer, but I'm not seeing anyone talk about how much extra time it takes. Or you're doing it in a way that doesn't take much time somehow?