1

If I say have a test branch that I never want to be merged into staging, would that be possible to set up? I.e. if I have feature-branch-a and that is merged into test it would not be possible to merge in test -> staging, but feature-branch-a -> staging would work fine.

Kit Sunde
  • 35,972
  • 25
  • 125
  • 179

1 Answers1

2

Locally, you can do it with a pre-commit hook, as described in "Is there a way to keep two branches from merging in git".
But that hook won't replicate amongs repos, it will stay local.

If you have a centralized repo server, you can add gitolite and declare a similar hook as a VREF (update hook).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • gitolite is not a prerequisite for using an update hook to reject a push - heh you've updated the linked answer since I last read it =) – AD7six Jan 24 '13 at 10:04