Ryan Larrabure
Ryan Larrabure

Reputation: 3

Is there a way to disable rebasing on a particular branch in Github?

We're using Github: FI and we want to have a release branch that is immune from history manipulation / rebasing. Besides establishing a policy, is there a way, with our current setup, to achieve this?

Upvotes: 0

Views: 336

Answers (1)

Lily Ballard
Lily Ballard

Reputation: 185801

I think establishing a policy is the best way. With manually-managed git repos you can use a hook (probably pre-receive) to deny non-fast-forward pushes, but I don't believe Github:FI exposes server-side hooks. But a policy and public shaming for any violators is probably going to be effective enough. Besides, a hook would prevent you from force-pushing in the rare event that you, the admin, really do need to "fix up" the branch.

Upvotes: 1

Related Questions