I have been experimenting with git branch permissions in Stash, but I may be missing something, as in my current understanding there appears to be a flaw in the branch permissions model.
I've successfully defined branch permissions to let certain users push only to a particular branch, call it "feature1", whilst another user (the build manager) is able to push to master. This means that the build manager can merge changes from feature1 to master in his local repo and push them to Stash. The other users can't push from their local master branch to Stash, but there appears to be nothing to stop them either working on master (by mistake) or merging to master in their local repo (again by mistake). Then when they try to push, the Stash branch permission prevents it, leaving them with a commit that can't go anywhere and which has to be removed using a hard reset.
In other words, how can I replicate the branch permissions in a Stash repo down to the local repo? I know that users can pretty much do what they like in their own repo, but it would be good to have some scheme that prevented accidental commits and merges to the wrong local branch.
I don't currently use Pull requests, if that is part of the answer.