re: Git Merge vs Git Rebase VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

Simple solution: disallow rewriting history on your server (aka. git push --force MUST not be allowed, ever). This will prevent people from pushing rebased history.

We use strategy where force push is disallowed for main branches (e.g. master) but allowed for individual developer branches. This way developers can commit freely and the history can be cleaned up before the changes are taken to master (while also being able to push the intermediate work to remote).

code of conduct - report abuse