S Gerritom delam

Account setup

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

  2. Potreboval boš tudi [upload SSH ključ]https://review.jami.net/settings/#SSHKeys) da bi lahko opravil spremembe za pregled.

  3. Ne pozabi izbrati uporabniškega imena.

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

Pomembno

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

To view your Git config

git konfiguracija --list

To test your SSH access

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

ssh -p 29420 <upername>@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.

Za posodobitev konfiguracije

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

git daljinsko nastavitve url izvor ssh://<username>@review.jami.net:29420/<projekt_name>

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

Ali klonirajte obstoječi skladišče, če želite začeti znova.

Vlagati po predpostavki v refs/for/master

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

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

Za pripravo pregleda

Ko se vrneš na čarovniški podružnico, se bo samodejno ustvaril pregled Gerrita.

git potiska izvor HEAD:refs/for/master

Če ste nastavili privzeto v ref/for/master, kot je opisano zgoraj, preprosto

git potiska

Če HEAD trenutno kaže na podružnico s commit-mi, ki jih želite premakniti.

git potiska izvor <bugfix_branchname>: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.

Na primer, lahko želite, da se „zasebni“ daljinski daljinski del pritisne na; odprite <project_dir>/.git/config in dodate:

[remote "private"]

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

Potem pa:

git potiska zasebni

Privati delajo enako kot pakovi, razen da niso privzeto vidni drugim in ne sprožijo nobenega Jenkinsovega gradiva.