Gitolite allows you to define groups of users or repositories for convenience. The syntax is very simple, and does not distinguish between a user group and a repository group. For example, take a look at the deny rule example in the previous section:
- master = bob RW+ = bob
Let's say that, instead of just Bob, you had several more users who must be prevented from pushing the master
branch, perhaps because they are all junior developers. One way is to add each of their usernames on both the rule lines, after Bob's username, like this:
- master = bob carol dave RW+ = bob carol dave
But this gets cumbersome, and will only get worse if there are more rules to be applied to the same group of people.
With groups, however, you can do this:
@junior-devs = bob carol dave - master = @junior-devs RW+ = @junior-devs
As you can see, this is far more convenient, and also less error...