Δουλεύοντας με τον Γκέριτ
Account setup
Διοικητής:
Χρησιμοποιούμενος έγγραφο: 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 απόσταση set-url προέλευση ssh://<username>@review.jami.net:29420/<project_name>
Replace <project_name>
with the correct project (example: jami-daemon).
Ή κλωνοποιήστε το υπάρχον αποθετήριο αν θέλετε να ξεκινήσετε από την αρχή.
Για να σπρώξετε κατά προεπιλογή σε refs/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
Για να Δημιουργήσουμε την Επισκόπηση
Όταν πιέσεις σε αυτό το μαγικό κλάδο, αυτόματα θα δημιουργηθεί μια αναθεώρηση για τον Gerrit.
git πύση προέλευση ΠΕΔ:refs/for/master
Εάν έχετε ρυθμίσει την προεπιλεγμένη σε refs/for/master όπως περιγράφεται παραπάνω, απλά
git πιέσει
Αν το HEAD δείχνει προς το τμήμα με τα commits που θέλετε να πιέσετε.
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.