Работа с Герритом
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.
Важно
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
Gerrit — официальный репозиторий Git.
Чтобы обновить конфигурацию
You must update your remote information to now use the Gerrit repository. To do that, update your origin URL:
git удаленный набор URL происхождения ssh://<username>@review.jami.net:29420/<project_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 конфигурировать remote.origin.push HEAD:refs/for/master
Для создания обзора
При переходе на эту волшебную ветвь, автоматически будет создан обзор на Герт.
git толкающий источник HEAD: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 толкать частный
Частная работа такая же, как и набор пачсов, за исключением того, что они не видны другим по умолчанию и не запускают никаких конструкций Дженкинса.