I favour master branch development, but as git and github become even more and more successful, everyone favour PR-driven work. Don’t get me wrong. I love git and github, and can’t think of any other work environment without them.
So my compromise is deploy my PR to the integration environment at least once a day and merge the change to the master branch. It’s a compromised version of continuous integration, or “throttled continuous integration”
What are the benefits? I think many, but some of them I can think of now are
- With smaller PR, you can have more thorough code review. Any discussion of code will start earlier and you have more time to think and to improve it. The merge or rebase will be trivial as you have smaller scope. You wouldn’t have as many as conflict as before.
- By pushing your code into master branch more often, you have each other’s code as early as possible. So, when you deploy your branch to a testing environment, it wouldn’t wipe out your colleagues’ code he might be testing. No competition for adhoc deployment is necessary.
- Basically all the benefits of continuous integration including the above.
What do you think?