3

I have two branch one for release and one for production. All the developer pushes their changes to production and integrator takes the changes(merge) to release. Is there a way I can reject the changes pushed by particular user ? Two use case given below.

  1. Changes pushed one top of user’s changes.
  2. No changes pushed on top of user’s changes.
maestromani
  • 841
  • 1
  • 9
  • 31
  • I think the solution might be to have the two branches live in two separate repositories. Then everyone has the right to push to one of them, but not to the other. – Tyler Aug 08 '11 at 05:34
  • Let's say one user pushed some change and another two users pushed on top of it, is there a way i can selective take last changes to another stream. I prefer to reject the first push so i don't need to selective merge every time. – maestromani Aug 08 '11 at 06:22

1 Answers1

1

One solution is to use Gitolite, which has branch-level access management.
If you are using a protocol with authentication, Gitolite will manage the authorization part.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks a lot for the reply, i do use gitolite. WE have set of users who can push the changes to production branch. Person who got access to production stream wrongly pushed the changes which is breaking the entire system, is there a way to roll back ? – maestromani Aug 08 '11 at 06:20
  • 1
    @maestromani: if people have already clone those changes, a `git revert` would be preferable. See http://stackoverflow.com/questions/6971717/github-how-to-revert-changes-to-previous-state/6971775#6971775 for the two possible options. – VonC Aug 08 '11 at 06:25