Laborante kun Gerrit

Account setup

  1. Sign in with your Google, GitHub, or git.jami.net account.

  2. Vi ankaŭ devas alŝuti SSH ŝlosilon por povi fari ŝanĝojn por revizio.

  3. Ne forgesu elekti uzantnomon.

  4. Finally, the email address specified in your git config must match one of the email addresses registered with your Gerrit account.

Important

For Savoir-faire Linux Inc. employees: please continue to use your @savoirfairelinux.com email address.

To view your Git config

git konfig --list

To test your SSH access

To check that your SSH access is properly set up, run the following command:

ssh -p 29420 <username>@review.jami.net

is your Gerrit username that you should have set during the account creation. If not, you can do that here.

If your access is granted, you should see a message like:

****    Welcome to Gerrit Code Review    ****

Hi, you have successfully connected over SSH.

  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:

  git clone ssh://<username>@review.jami.net:29420/REPOSITORY_NAME.git

Connection to review.jami.net closed.

Git configuration

Gerrit is the official Git repository.

Por ĝisdatigi la konfiguracion

You must update your remote information to now use the Gerrit repository. To do that, update your origin URL:

git malproksima aro-url origino ssh://<username>@review.jami.net:29420/<project_name>

Replace <project_name> with the correct project (example: jami-daemon).

Aŭ klonu la ekzistantan deponejon, se vi volas komenci de la komenco.

Por puŝi laŭ defaŭlto en refs/for/master

You can configure Git to automatically create a review when a change is pushed.

git konfiguri remote.origin.push HEAD:refs/for/master

Por krei la revizion

Kiam oni iras al tiu magia branĉo, oni aŭtomate kreas recenzon pri Gerrit.

git puŝu origino HEAD:refs/for/master

Se vi konfiguris la defaŭlta al refs/for/master kiel priskribita supre, simple

git puŝ

Se HEAD nuntempe montras la branĉon kun la komitatoj vi ŝatus puŝi. Ideale, vi devus labori en funkcio / bug branĉo por la problemo ĉe mano. tiam vi povas fari:

git puŝo origino <bugfix_branĉo nomo>:refs/for/master

If this is the first time you’ve pushed, you will be prompted to install a post-commit hook to insert a Change-ID in your commit message. Gerrit needs this to track patch sets and will reject pushes until you install it. Simply copy and paste the command to install the hook as instructed by Gerrit and amend your commits.

To push a private patch

You can push a work in progress (a.k.a. draft) by pushing to refs/for/master%private.

Ekzemple, vi eble volas “privata” malproksima por puŝi al; malfermu <project_dir>/.git/config kaj aldonu:

[remote "private"]

    url = ssh://<username>@review.jami.net:29420/jami-daemon
    push = HEAD:refs/for/master%private

Kaj poste:

git puŝu privata

Privataj funkcioj estas la sama kiel parketaroj, krom tio, ke ili ne estas videblaj al aliaj defaŭlte kaj ne ekfunkciigas iun ajn konstruon de Jenkins.