Book Image

Gitolite Essentials

By : Sitaram Chamarty
Book Image

Gitolite Essentials

By: Sitaram Chamarty

Overview of this book

Table of Contents (19 chapters)
Gitolite Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Giving users their own branches


When there are more than a few developers in a project, it is often necessary for them to share code that is still under development, for comments, discussion, preliminary testing, and so on. The obvious solution is for each developer to push to a branch on the Gitolite server and inform his colleagues of the branch name. A branch namespace dedicated to this can be created, giving all developers access to it, as follows:

repo foo
    RW+    sandbox/  =  @developers

This works fine, but it could lead to a situation where one developer accidentally overwrites or deletes another developer's branch if the branch naming within the sandbox namespace is not strictly controlled.

What is required, ideally, is something as follows:

    RW+    sandbox/alice/  =  alice
    RW+    sandbox/bob/    =  bob

and so on, for each user who should be given access to the repository.

Clearly, this is not at all scalable—you'd have to add one line for each user if you did this. In fact...