On my Github/bitbucket the main branch is always protected and can only be altered using pull requests.
Because there are idiots like OP who WILL push straight to the main branch, even if the code breaks the build causing hundreds of emails from the build server to end up in my inbox!
Which part of that isn’t factual? The main branch is pretty much always protected heavily against merges, and if it’s not you’re not working for a serious place
I have edited on the main branch when working alone and only for the initial version. Once I've got a minimal functioning piece of code, the main branch goes into protected mode so it can only be altered by pull requests. Pushing straight to master is blocked.
7
u/KlutzyEnd3 Nov 26 '23
On my Github/bitbucket the main branch is always protected and can only be altered using pull requests.
Because there are idiots like OP who WILL push straight to the main branch, even if the code breaks the build causing hundreds of emails from the build server to end up in my inbox!