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

If you have three branches (A, B, and Feature) and you want to merge Feature into Branch A, can you require Feature to be merged into Branch B first?

I was thinking that something with actions would be the way, but I’ve never used it, so I’m not 100%.

I’m open to other solutions though.

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.