Git.alt quickstart

From ALT Linux Wiki

This page is a quickstart for git.alt, but is not a git.alt reference or git tutorial.

Setting up

Make sure your SSH key is registered by the Sisyphus gatekeepers and set up git as described in reference.

Cloning someone's repository

Use find-package command to search for repositories:

$ ssh git.alt find-package bugzilla
/people/vvk/packages/bugzilla.git	1168522087
$

clone command is used to clone repositories:

$ ssh git.alt clone /people/vvk/packages/bugzilla.git
Initialized empty Git repository in /people/dottedmag/packages/bugzilla.git/
$

clone just created your own copy of repository on server. Use the git to clone your copy from server to local disk:

$ git clone ssh://git.alt/people/dottedmag/packages/bugzilla.git
Initialized empty Git repository in /home/dottedmag/bugzilla/.git/
....
$

Creating new repository

Just use the init-db command:

$ ssh git.alt init-db test
Initialized empty Git repository in ./
girar-init-db:	/people/dottedmag/public/test.git
$

As there are no commits in newly created repository, it is not possible to git-clone it. Instead create empty local repository and work on it:

$ mkdir test; cd test; git-init
Initialized empty Git repository in /home/dottedmag/test/.git/
$

When you need to send results to server, add the remote repository and push:

$ git remote add origin ssh://git.alt/people/dottedmag/packages/test.git
$ git push origin master
...
$

It is only necessary to mention origin and master once, to create master branch in remote repository. git-push without arguments will work once the remote branch is created.