Att arbeta med Gerrit
Account setup
Gerrit-servern: https://review.jami.net
Användardokumentation: https://review.jami.net/Documentation/intro-user.html
Jami-projekt på Gerrit: https://review.jami.net/admin/repos/
Sign in with your Google, GitHub, or git.jami.net account.
Du måste också [uploada en SSH-nyckel]https://review.jami.net/settings/#SSHKeys) för att kunna göra ändringar för översyn.
Glöm inte att välja ett användarnamn.
Finally, the email address specified in your git config must match one of the email addresses registered with your Gerrit account.
Viktigt
For Savoir-faire Linux Inc. employees: please continue to use your @savoirfairelinux.com email address.
To view your Git config
git konfigurera --list
To test your SSH access
To check that your SSH access is properly set up, run the following command:
ssh -p 29420 <användarnamn>@review.jami.net
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.
För att uppdatera konfigurationen
You must update your remote information to now use the Gerrit repository. To do that, update your origin URL:
git fjärrställd url ursprung ssh://<username>@review.jami.net:29420/<projekt_namn>
Replace <project_name>
with the correct project (example: jami-daemon).
Eller klona det befintliga arkivet om du vill börja på nytt.
Att trycka efter standard i refs/for/master
You can configure Git to automatically create a review when a change is pushed.
git konfigurera remote.origin.push HEAD:refs/for/master
För att skapa en översyn
När du går till den här magiska gren skapas en recension av Gerrit.
git tryck ursprung HÖR:refs/for/master
Om du konfigurerade standarden till refs/for/master som beskrivs ovan,
git trycka
Om HEAD för närvarande pekar på den gren med commits du vill trycka.
git tryck ursprung <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
.
Du kan till exempel vilja ha en ”privat” fjärrkontroll att trycka till; öppna <project_dir>/.git/config och lägga till:
[remote "private"]
url = ssh://<username>@review.jami.net:29420/jami-daemon
push = HEAD:refs/for/master%private
Then:
git press privat
Privat arbete på samma sätt som patchset, men de är inte synliga för andra som standard och utlöser inte några Jenkins bygg.