Skip to content

Is it possible to require branch to be merged in one branch before another? #21578

Discussion options

You must be logged in to vote

You could create a pre-commit hook that launches a script that will prevent merging Feature into A if it’s not en-par with B. But I would advise against such approaches, for they are most likely going to create problems, especially if you ever end up having to rewrite branches history.

Since you’re dealing with just two branches, I suggest you keep doing it manually (which forces you to manually check their status), and if you really need to implement an automated solution, make it so that it’s an optional status check and that doesn’t handle these operations automatically.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants