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.
Asked
Active
Viewed 55 times
1

Kit Sunde
- 35,972
- 25
- 125
- 179
-
How would you know where a commit comes from? – Reactormonk Jan 24 '13 at 07:21
1 Answers
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).
-
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