Mit Gerrit zusammenarbeiten

Account setup

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

  2. Sie müssen auch [einen SSH-Schlüssel hochladen]https://review.jami.net/settings/#SSHKeys) um Änderungen zur Überprüfung vornehmen zu können.

  3. Vergessen Sie nicht, einen Benutzernamen auszuwählen.

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

Wichtig

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

To view your Git config

git Konfiguration --list

To test your SSH access

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

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

Um die Konfiguration zu aktualisieren

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

git Remote Set-url Ursprung ssh://<Username>@review.jami.net:29420/<Projekt_name>

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

Oder klonen Sie das bestehende Repository, wenn Sie neu anfangen wollen.

Das System wird von einem System ausgestellt, das die Funktion des Systemes ausweist.

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

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

Um die Überprüfung zu erstellen

Wenn man auf diesen Zauberzweig drückt, wird automatisch eine Überprüfung über Gerrit erstellt.

git Schub Ursprung HÜF:refs/for/master

Wenn Sie die Standard-Konfiguration auf Refs/for/master wie oben beschrieben konfiguriert haben,

git schieben

Wenn HEAD derzeit auf die Zweigstelle mit den Kommitten verweist, die Sie schieben möchten. Idealerweise sollten Sie in einer Funktions-/Bug-Seite für das aktuelle Problem arbeiten.

git Push origin <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.

Zum Beispiel möchten Sie eine „private“ Fernbedienung aufdrücken; öffnen Sie <project_dir>/.git/config und fügen Sie hinzu:

[remote "private"]

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

Dann:

git schieben private

Private Arbeiten ähnlich wie Patchset, außer dass sie von Standardbasis für andere nicht sichtbar sind und keine Jenkins-Builds auslösen.