Hello Team,
My team consist of a number of developers who requires write access to branches named branch 1 and branch 2. Now sometimes, they mistakenly merges wrong branch to the wrong target. i.e, they are suppose to merge branch 1 to branch 2. What is the way to prevent users from merging branch 2 to branch 1. Or is there a way to make branch 2 a default one?
Warm Regards,
-Jewel
We're actually looking to do this very thing. Doing a google search I don't see any plugins that have this capability as well. Something I'm missing? Trying to not write our own plugin here if it's at all possible.
You can make branch2 default in the repository settings. But there is no way to restrict the merges based on branches.
You can write plugins with hooks to prevent it on the server. But users will still be able to do it locally. The advantage and disadvantage of using git!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using pull requests when merging between branch 1 and branch 2? You can change the default branch for a repository under settings > repository details. The default branch will be used as the target branch when you create a pull request. But it will not prevent a user from changing the target branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.