Együttműködés Gerrittel
Fiók beállítása
Gerrit-kiszolgáló: https://review.jami.net
Felhasználói dokumentáció: https://review.jami.net/Documentation/intro-user.html
Jami projektek Gerriten: https://review.jami.net/admin/repos/
Sign in with your Google, GitHub, or git.jami.net account.
Ezenkívül fel kell töltenie egy SSH-kulcsot, hogy el tudja végezni a módosításokat felülvizsgálat céljából.
Emlékezni kiválasztani a felhasználónevet!
Finally, the email address specified in your git config must match one of the email addresses registered with your Gerrit account.
Fontos
For Savoir-faire Linux Inc. employees: please continue to use your @savoirfairelinux.com email address.
To view your Git config
git config --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
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.
A beállítások frissítése
You must update your remote information to now use the Gerrit repository. To do that, update your origin URL:
git remote set-url origin ssh://<username>@review.jami.net:29420/<project_name>
Replace <project_name>
with the correct project (example: jami-daemon).
Vagy klónozzuk a meglévő tárat, ha újra szeretnénk kezdeni.
Nyomtatás alapértelmezés szerint a refs/for/master ágban
You can configure Git to automatically create a review when a change is pushed.
git config remote.origin.push HEAD:refs/for/master
Vélemény létrehozásához
Amikor erre a varázságra tolja, Gerrit automatikusan felülvizsgálja ezt a lökést.
git push origin HEAD:refs/for/master
Ha az alapértelmezést a refs/for/master értékre állította be a fent leírtak szerint, egyszerűen
git push
Ha a HEAD (FEJ) jelenleg arra az elágazásra mutat, amelyikben az elküldeni kívánt commitok vannak. Ideális esetben egy szolgáltatás-/hibaágazatban kell dolgoznia az adott probléma megoldásában. Ezután megteheti:
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
.
Például érdemes lehet egy „private” (privát) távirányítót küldeni; nyissa meg a /.git/config fájlt, és adja hozzá:
[remote "private"]
url = ssh://<username>@review.jami.net:29420/jami-daemon
push = HEAD:refs/for/master%private
Akkor:
git push private
A privát munka ugyanúgy működik, mint a javításkészletek, kivéve, hogy alapértelmezés szerint mások számára nem láthatók, és nem indítanak el Jenkins buildeket. A piszkozat ezután megosztható vagy közzétehető.