Preventing force-push is only one small part of a good solution<i>.<p></i>good solution:<p>1. create pull request which is automatically being tested by CI<p>2. instead of hitting &#x27;merge&#x27;, tell build bot to take pull request and merge it into temporary copy of master<p>3. if tests pass on build bot, it applies pull request to master (by pushing temporary branch)<p>4. never ever push to master yourself<p>This is also basically what <a href="http:&#x2F;&#x2F;homu.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;homu.io&#x2F;</a> does.