0

I have a git-gerrit project with several branches.

  1. all team members have Owner for refs/*
  2. all team members have Push and Push Merge Commit for refs/heads/master
  3. each team member works on a feature, each one has Push and Push Merge Commit for his or her refs/heads/xxxx feature branches
  4. there are specific branches (protected) not used for development: testing, pre-release, release, etc. Nobody has Push or Push Merge Commit for these branches

The goal is to prevent that team members mistakenly push into the protected branches. But it turns out that if somebody pushes e.g. to refs/for/pre-release, after voting it in gerrit the change makes it to the git repo, it gets merged successfully.

What configuration can prevent this?

Thanks

Martijn Pieters
  • 889,049
  • 245
  • 3,507
  • 2,997
Androrider
  • 950
  • 2
  • 10
  • 19

1 Answers1

1

What about this type of configuration?

Reference: refs/for/refs/*
    Push = ALLOW Registered Users
Reference: refs/for/refs/pre-release
    Push = BLOCK Registered Users
    Push = ALLOW Group-X