Introduction

Here are some how-to guides to get you going more easily than the
reference information linked via the tabs above. If you are a
beginner, the the Pro Git
book is another good resource.

This tutorial is aimed at end-users, rather than account admins.
The admin documentation describes how to
get an account set up, and this tutorial assumes your account is set
up in the recommended way.

In the examples, I have used acct
as a place-holder for the account you are using on this server,
and spqr1 as a place-holder for your username;
$ is your shell prompt and things you type
are set in bold. For instance,

You can run any of these commands without arguments to get
information about how to use them. They are also described briefly
in the user documentation.

Another notable command is info which gives you a
list of the repositories that you have access to, and the
permissions you have on each of them. R is for read access, W is for
write access, and C means you can create new repositories.

You can see the same list of repositories (but without access
permissions) on the Raven-authenticated part of the gitweb server
at <https://git.uis.cam.ac.uk/i/acct/>.
The page header on this authenticated internal view has /i/ in the breadcrumbs.

The unauthenticaed part of the gitweb server
<https://git.uis.cam.ac.uk/x/acct/>
shows only repos which allow anonymous access.
The page header on this unauthenticated external view has /x/ in the breadcrumbs.

Click the i/x internal/external toggle in the breadcrumbs line to
switch view.

Create a repo on the server

The first thing you might want do is create a repository on the
server. The C permission displayed by the
info command shows where you can create a repo. The
runic utterance u/CREATOR/..* is a wildcard pattern which
means spqr1 can create repositories with names
like u/spqr1/repo.

You want to upload this to the git server. First, create the target
repository. This has to be done explicitly to avoid messes that
would occur if repositories were automatically created by mistyped
git push commands.

Change access permissions

Part of the point of this git server is to support collaboration,
so the next thing you want to do is give your colleagues access
permissions to your repositories. The perms command
has some terse usage instructions.

And you can add a README to be included on the repo's summary page.
This file will become visible when you next push the repo to the
server. (If you already have a README file then just setting the
config variable is not enough to make it appear.)

You can see in the push output above that the server said it was
sending you email. If you check your inbox, you can see one message
which gives a summary of the push, plus one message for each commit.

Remove repositories

If you have been trying out these examples in your own account, you
may want to clean away the tutorial repositories.

The D command is for deleting repositories. For safety,
it requires two steps.

$ ssh acct@git.uis.cam.ac.uk D
Usage: ssh git@host D
The whimsically named "D" command deletes repos ("D" is a counterpart to the
"C" permission which lets you create repos. Which also means that, just
like "C", it only works for wild repos).
There are two kinds of deletions: 'rm' removes a repo completely, while
'trash' moves it to a trashcan which can be recovered later (upto a time
limit that your admin will tell you).
The 'rm', 'lock', and 'unlock' subcommands:
Initially, all repos are "locked" against 'rm'. The correct sequence is
ssh git@host D unlock repo
ssh git@host D rm repo
Since the initial condition is always locked, the "lock" command is
rarely used but it is there if you want it.
The 'trash', 'list-trash', and 'restore' subcommands:
You can 'trash' a repo, which moves it to a special place:
ssh git@host D trash repo
You can then 'list-trash'
ssh git@host D list-trash
which prints something like
repo/2012-04-11_05:58:51
allowing you to restore by saying
ssh git@host D restore repo/2012-04-11_05:58:51
$ ssh acct@git.uis.cam.ac.uk D unlock u/spqr1/echidna
'u/spqr1/echidna' is now unlocked
$ ssh acct@git.uis.cam.ac.uk D rm u/spqr1/echidna
'u/spqr1/echidna' is now gone!
$ ssh acct@git.uis.cam.ac.uk D unlock u/spqr1/wombat
'u/spqr1/wombat' is now unlocked
$ ssh acct@git.uis.cam.ac.uk D rm u/spqr1/wombat
'u/spqr1/wombat' is now gone!
$