Gerrit ile birlikte çalışmak

Account setup

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

  2. Ayrıca, inceleme için değişiklikler yapabilmek için [SSH anahtarı yüklemeniz] (https://review.jami.net/settings/#SSHKeys) gerekecektir.

  3. Kullanıcı adını seçmeyi unutma.

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

Önemli

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

To view your Git config

git yapılandırma --list

To test your SSH access

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

ssh -p 29420 <kullanıcı adı>@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.

Yapılandırmayı güncelleme

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

git uzaktan ayarlı url kökeni ssh://<username>@review.jami.net:29420/<project_name>

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

Ya da yeni başlamak istiyorsanız mevcut deposu klonlayın.

Default olarak basmak için ref/for/master

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

`git remote.origin.push yapılandırması

Tekrarlama Yapmak

Bu sihirli dalı kullanırken, Gerrit’in üzerine otomatik olarak bir inceleme oluşturulacak.

git itme kökeni Başlık:refs/for/master

Eğer öntanımlı olarak yukarıda açıklandığı gibi refs/for/master ayarladıysa,

git it

Eğer HEAD şu anda, commit’leri ile yönlendirirse, itmek istediğiniz bölgeyi gösterir. İdeal olarak, ele alınan sorun için bir özellik / hata bölgesi içinde çalışmalısınız.

git tıklatma kökeni <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.

Örneğin, “özel” bir uzaktan uzaktan uzaktan yönlendirmek isteyebilirsiniz; <project_dir>/.git/config açın ve ekleyin:

[remote "private"]

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

Sonra:

git private

Özel çalışmalar, diğerleri için öntanımlı olarak görünür değil ve herhangi bir Jenkins oluşturmasını tetiklemez.