How to prevent a specific branch from being merged in git?
问题 We have a master branch where the released production code lives, a dev branch where the code for the test server lives, and various feature branches (branched from master ) as each developer sees fit. Over the course of time the dev branch has diverged somewhat from master . In addition, there are some incorrect merges there that mess up parts of the code. Several times already we have tried to reset (force-push) dev to be the same as master . To start over with a clean slate, so to say.