3 ms·
You seem to imply that working on a feature branch means you wait until you're finished the feature to try and merge your changes, which would be an absolutely
by sgk284 13y ago
You seem to imply that working on a feature branch means you wait until you're finished the feature to try and merge your changes, which would be an absolutely insane workflow in any sizable org.
While working on a feature branch, you should be pulling in the latest from origin/master on a pretty regular basis such that you never have a big merge. You should be merging early and merging often.
The benefit here is that you get to work on functionality without hindering anyone else (by putting the codebase in a functioning, but transitional state), while getting to integrate on your own schedule. By the time it's ready to push to everyone else, there should be no merge. It'll be a fast-forward.
Feature branches, with a policy of merge early and often, make life substantially easier than traditional continuous integration workflows. Having everybody checking in in-progress work to the same place is a nightmare.
When I'm working on a feature, I want to be able to commit in small bite-sized chunks that allow me to explore solutions, rollback changes, rebase on-top of whatever I want, and ultimately squash my work into a single cleanly merged chunk of work. Any other workflow is limiting and restricting many of the benefits of git.
- calpaterson 13y agoI think we have a language difference: when I say "merging" I don't mean, "incorporate changes from trunk" I mean "you branch and trunk become the same". > getting to integrate on your own schedule Essentially, this is what I oppose, for the reasons I described originally. > Any other workflow is limiting and restricting many of the benefits of git. The point of git is to make your workflow better, the point of your workflow is not to make git better. Yeah "branching is easy", and that's good, but it doesn't necessarily mean that you want to start using branches heavily (especially long-lived ones). Bad version control systems were only part of the reason to avoid branches.