Работа с Джъррит
Account setup
Сервер на Gerrit: https://review.jami.net
Документация на потребителя: https://review.jami.net/Documentation/intro-user.html
Проекти на Jami за Gerrit: https://review.jami.net/admin/repos/
Sign in with your Google, GitHub, or git.jami.net account.
Ще трябва да [нанесете SSH ключ]https://review.jami.net/settings/#SSHKeys) за да можете да направите промени за преглед.
Не забравяйте да изберете потребителско име.
Finally, the email address specified in your git config must match one of the email addresses registered with your Gerrit account.
Important
For Savoir-faire Linux Inc. employees: please continue to use your @savoirfairelinux.com email address.
To view your Git config
git конфигурация --list
To test your SSH access
To check that your SSH access is properly set up, run the following command:
ssh -p 29420 <име на потребител>@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.
За актуализиране на конфигурацията
You must update your remote information to now use the Gerrit repository. To do that, update your origin URL:
git дистанционно настройка на URL произход ssh://<употребителско име>@review.jami.net:29420/<проект_name>
Replace <project_name>
with the correct project (example: jami-daemon).
Или клонира съществуващия репозиторий, ако искаш да започнеш отначало.
За да се натисне по подразбиране в реф/за/мастер
You can configure Git to automatically create a review when a change is pushed.
git config remote.origin.push HEAD:refs/for/master
За да създадем преглед
Когато се придвижим към тази магическа клонка, автоматично ще се създаде преглед на Джеррит.
git натискане произход ОРЕ:refs/for/master
Ако сте конфигурирали дефолта на реф/за/мастер, както е описано по-горе, просто
git тласка
Ако HEAD в момента посочва към клона с ангажиментите, които искате да натиснете.
git натискане произход <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
.
Например, може да искате да натиснете на „частен“ дистанционен контрол; отворите <project_dir>/.git/config и добавете:
[remote "private"]
url = ssh://<username>@review.jami.net:29420/jami-daemon
push = HEAD:refs/for/master%private
След това:
git тласка частен
Приватната работа е същата като настройките, но не е видима за другите по подразбиране и не предизвиква създаване на Jenkins.