Git: Prevent commits in master branch
问题 (For simplicity) I have a master branch and a dev in my Git-repo. I want to ensure the master branch is always working, so all work I do should be in the dev branch. However, when I merge my changes in with a --no-ff merge, I tend to stay in the master branch, and just continue working in it (because I forget to checkout my dev branch). Can I put up a rule for the master branch, which states I can\'t do commits, and fast-forward merges, but only --no-ff merges from another branch? This must