2

I have a release branch "R1", to which my feature branches would get merged once they are developed and tested successfully.

So when "R1" is released, i want to make the branch "R1" Read-only, so that no more merges or commits are possible on it.

I just dont want to tag it and keep the tag, i want to stop any changes on that branch.

user3733202
  • 23
  • 1
  • 3
  • 3
    possible duplicate of [git branch permissions?](http://stackoverflow.com/questions/13248246/git-branch-permissions/13248418#13248418) – Trudbert Aug 19 '14 at 11:52
  • related: http://stackoverflow.com/questions/10996248/freezing-a-git-branch – jub0bs Aug 19 '14 at 11:54
  • possible duplicate of [A way to restrict Git branch access?](http://stackoverflow.com/questions/8781240/a-way-to-restrict-git-branch-access) – TheCodeArtist Aug 19 '14 at 13:14

1 Answers1

0

You can essentially freeze a branch using the Commit Policy Plugin:

  1. Create a new commit policy
  2. Reduce its scope to your branch (or branches using a name pattern)
  3. Only allow the filenames matching the glob "!({*})" (i.e. do not allow any files added/deleted/modified)
Ferenc Kiss
  • 182
  • 4