کار با گریت
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 config --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://<username>@review.jami.net:29420/<project_name>
Replace <project_name>
with the correct project (example: jami-daemon).
یا کلون مخزن موجود اگر می خواهید از نو شروع کنید.
برای فشار دادن به صورت پیش فرض در ref/for/master
You can configure Git to automatically create a review when a change is pushed.
git config remote.origin.push HEAD:refs/for/master
برای ایجاد بررسی
وقتي به اين شاخه جادويي فشار مياد، به طور اتوماتيكي بر سر "جريت" بازيابي پيدا ميشه
`git اصل فشار HEAD:refs/for/master
اگر شما تنظیم شده است پیش فرض به ref/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 فشار خصوصی
کار خصوصی به همان شیوه ای که مجموعه های پیچ انجام می شود، به جز اینکه آنها به طور پیش فرض برای دیگران قابل مشاهده نیستند و هیچ ساخت جینکینز را تحریک نمی کنند. یک مسود پس از آن می تواند به اشتراک گذاشته یا منتشر شود.