जेरित के साथ काम करना

Account setup

  1. Sign in with your Google, GitHub, or git.jami.net account.

  2. आपको समीक्षा के लिए परिवर्तन करने में सक्षम होने के लिए [SSH कुंजी अपलोड करना होगा]https://review.jami.net/settings/#SSHKeys) ।

  3. एक उपयोगकर्ता नाम चुनना न भूलें।

  4. 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

is your Gerrit username that you should have set during the account creation. If not, you can do that here.

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).

या यदि आप नई शुरुआत करना चाहते हैं तो मौजूदा भंडार को क्लोन करें।

रेफ / फॉर / मास्टर में डिफ़ॉल्ट रूप से धक्का देना

You can configure Git to automatically create a review when a change is pushed.

git remote.origin.push HEAD:refs/for/master

समीक्षा का निर्माण

जब आप इस जादुई शाखा में धक्का देते हैं, तो स्वचालित रूप से Gerrit पर एक समीक्षा बनाई जाएगी।

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 धक्का निजी

निजी काम पैचसेट के समान है, लेकिन वे डिफ़ॉल्ट रूप से दूसरों के लिए दिखाई नहीं देते हैं और किसी भी जेनकिंस बिल्ड को ट्रिगर नहीं करते हैं। एक ड्राफ्ट को फिर साझा या प्रकाशित किया जा सकता है।