The GIT version control system is gaining more and more momentum also in the HEP community. For small/medium projects that do not fit in the regular LHCb develompent infrastructure and policies (see SVNUsageGuidelines), GIT seems to be a good alternative to Subversion.

To request git repositories, go to

Since GIT is not officially supported by LHCb, you should not expect to get much help about how to use it, but here are a few useful resources:

-- MarcoClemencic - 2015-05-05

Guidelines (Obsolete)

To allow LHCb users to manage special projects with GIT, we set up a small infrastructure to host user repositories.

Requesting a repository

Users wanting to host a project on GIT will have to send a mail to with the name they want for the repository, a short description of the project and the AFS username who should own the repository.

IMPORTANT: only projects that do not fit in the regular LHCb development model will be accepted.

Everybody will have read access to the newly created repositories, but write access will be limited to the owner and the users that the owner requested to be added. It is possible to foresee write access to AFS groups.

The created empty repository will be accessible directly via AFS, via SSH and HTTP with the following commands:

  • git clone /afs/<Project>.git
  • git clone ssh://<Project>.git
    • with another user: git clone ssh://<Project>.git
  • git clone<Project>.git

Note that the HTTP access is read-only.

Suggestion: with git it is possible to use two different URLs for fetch and push operations, which is very handy with our setup. What you have to do is:

git clone<Project>.git
cd <Project>
git remote set-url --push origin ssh://<Project>.git


The AFS directory /afs/ will point to a dedicated backed up volume and will be writeable only to Librarians.

A link in /afs/ pointing to /afs/ enables the HTTP access.

Create a new repository

Once the repository is approved, a librarian will have to issue the following commands:
git init --bare ${repo}
cd ${repo}
git update-server-info
afs_admin set_owner -r ${owner} ${repo}
afs_admin set_acl -r ${repo} ${owner} rlidwka
Check that the file ${project}.git/hooks/post-update.sample is executable and contains the line exec git update-server-info, then do
cd ${repo}/hooks
mv post-update.sample post-update
(this last step is needed to automatically create the special files required to allow HTTP access).


A PHP script (/afs/ shows a list of the currently hosted repositories.

Repository details

-- MarcoClemencic - 14-Mar-2012

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r10 - 2015-05-05 - MarcoClemencic
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback