I have two branches dev
and ui
, and I'm trying to merge ui into dev on a temporary branch dev-ui
. I've created a new branch from dev, and merged ui into it. So my branch schema is:
dev ----- dev-ui
ui --/
I'm using Gitolite, and I've locked master
and dev
branches from unauthorized writes. This is my config related file:
@myRepoDevs = dev1 dev2
repo myRepo
RW+ = admin
R dev master = @myRepoDevs
- dev master = @myRepoDevs
RW = @myRepoDevs
When one of two devs tries to push on dev-ui
to origin
, he receives this error from git console:
remote: FATAL: W refs/heads/dev-ui myRepo dev1 DENIED by refs/heads/dev
remote: error: hook declined to update refs/heads/dev-ui
To myServer:myRepo
! [remote rejected] dev-ui -> dev-ui (hook declined)
error: failed to push some refs to 'myServer:myRepo'
Why he can't push on dev-ui
?
Is because it is directly derived from dev
, or is because it has the prefix dev
on its name? Or an other reason?
Gitolite uses refex:
Son in your case, you need
dev$
in your gitolite rules.