Can I enforce a merge-only branch in git?

I'm using git, and I'm setting up the following branches to support my workflow:

  • release, which only contains released software,
  • testing, which contains software released to the testing group,
  • develop, which is where development happens,
  • some_topic_branch, where features, etc. get added.

Topic branches branch from and get merged into develop. When we're ready for a testing release, testing merges in develop. When a testing release is approved for production, release merges in testing.

This is all easy enough to set up, but I'm wondering about the enforcement options in git. For example, is it possible to enforce a policy where the only commits on the release branch are merges from testing, preventing changes from happening directly on the release branch?

19
задан Doug 3 November 2010 в 02:13
поделиться