1523
Comment: Fix URL
|
2487
Tell how to initialize the repository. Give some basic suggestion for repacking.
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
The git.debian.org admins will create a directory named /srv/git.debian.org/git/project-name owned by your project group which will be accessible by git using sftp, rsync over ssh, or http for read-only access. For instance, you'll be able to check out your branch though sftp with: | The git.debian.org admins will create a directory named /srv/git.debian.org/git/project-name owned by your project group. You need to initialize your repository yourself afterwards. Basically you have to do: |
Line 8: | Line 8: |
git clone ssh://<user>@git.debian.org/git/<group>/whatever.git | $ cd /git/<group> $ uname 002 $ mkdir myrepo.git $ cd myrepo.git $ git --bare init --shared $ vim description }}} Then you have to put some real content in that empty repository. Either "git fetch" on git.debian.org or "git push" from a remote host to git.debian.org. See below for the Git URLs that you can use. == Accessing repositories == They are accessible by git using sftp, rsync over ssh, or git-server/http for read-only access. For instance, you'll be able to check out your branch though sftp with: {{{ $ git clone ssh://<user>@git.debian.org/git/<group>/myrepo.git |
Line 14: | Line 29: |
git clone git://git.debian.org/git/<group>/whatever.git git clone http://git.debian.org/git/<group>/whatever.git |
$ git clone git://git.debian.org/git/<group>/myrepo.git $ git clone http://git.debian.org/git/<group>/myrepo.git |
Line 20: | Line 35: |
== Repository maintenance == Git repositories tend to grow quite large quickly. From time to time, you have to repack the repositories to save space and keep optimal performances (by not having too many of files in the objects subdirectory). {{{ $ cd /git/<group>/myrepo.git $ git repack && git gc }}} Those operations should be always safe. You can optimize even more by using some options but then people fetching over HTTP (bad idea!) might have troubles: {{{ $ git repack -a -d && git gc --prune }}} |
|
Line 23: | Line 52: |
mkdir ~/public_git | $ mkdir ~/public_git |
Line 29: | Line 58: |
git clone git://git.debian.org/~$login/project1.git | $ git clone git://git.debian.org/~$login/project1.git |
Using Git on Alioth
Creating a new public Git repository (for a new project)
Git repository on git.debian.org doesn't get created with a new project, you have to request it at the [https://alioth.debian.org/tracker/?group_id=1&atid=200001 Tracker: Support Requests].
The git.debian.org admins will create a directory named /srv/git.debian.org/git/project-name owned by your project group. You need to initialize your repository yourself afterwards. Basically you have to do:
$ cd /git/<group> $ uname 002 $ mkdir myrepo.git $ cd myrepo.git $ git --bare init --shared $ vim description
Then you have to put some real content in that empty repository. Either "git fetch" on git.debian.org or "git push" from a remote host to git.debian.org. See below for the Git URLs that you can use.
Accessing repositories
They are accessible by git using sftp, rsync over ssh, or git-server/http for read-only access. For instance, you'll be able to check out your branch though sftp with:
$ git clone ssh://<user>@git.debian.org/git/<group>/myrepo.git
Anonymous users will enjoy read-only access with:
$ git clone git://git.debian.org/git/<group>/myrepo.git $ git clone http://git.debian.org/git/<group>/myrepo.git
Please use the native git protocol, because it is much more efficient than cloning over http. If your firewall restricts access to port 9418 you could clone over http. But notice that if the upstream repo on alioth is repacked, you have to download the whole objects again if you clone/fetch over http.
Repository maintenance
Git repositories tend to grow quite large quickly. From time to time, you have to repack the repositories to save space and keep optimal performances (by not having too many of files in the objects subdirectory).
$ cd /git/<group>/myrepo.git $ git repack && git gc
Those operations should be always safe. You can optimize even more by using some options but then people fetching over HTTP (bad idea!) might have troubles:
$ git repack -a -d && git gc --prune
Using personal Git repositories
It is also possible to have personal Git repositories. Just log in on alioth, then
$ mkdir ~/public_git
and put your Git repositories there, e.g. project1.git, project2.git, etc.
They will be available through the following URLs:
$ git clone git://git.debian.org/~$login/project1.git
?CategoryAlioth