One practice I’ve been seeing more and more is to do all changes in a repo in PRs and never commit directly to the master branch. Examples include the NATS.io project and @khem seems to do all his changes that way. Also noticed the following in this article:
Changes without pull requests
That might look weird, but give me a second.
When a project is small and there are 0 or few users — that might be okay. It’s easy to follow what happened last days: fixes, new features, etc. But when the scale gets bigger, oh… it becomes a nightmare.
You have pushed few commits into the master, so probably you did it on your computer and no one saw what happened, there wasn’t any feedback. You may break API backward compatibility, forgot to add or remove something, even make useless work (oh, nasty one).
When you’re doing a pull request, some random guru-senior-architect might occasionally check your code and suggest few changes. Sounds unlikely but any additional eyes might uncover bugs or architecture mistakes.
Do not hide your work, isn’t this a reason for open sourcing it?
If you have thoughts on this practice, or how you’ve found it helpful, please comment.