Git+gerrit User Guide

Source: Internet
Author: User

In general, cloning a project after Local:

Initial setupFirst, get the public Keys1. Enter your virtual machine, enter "ssh-keygen-t RSA" at the command line, go all the way, 2. Enter "Cat ~/.ssh/id_rsa.pub", copy two, activate Gerrit account, add SSH public Keys 1. Open http://10.120.10.101/Login (account: Mailbox prefix initial password: 123456) First login will prompt to register the mailbox, add SSH pulick Key, if you miss this step, please follow the steps below to add: 2. Select the " Settings "3. Select" Contact information ", Register New email, fill in your email address,CopyEmail the full link address to the browser to activate your account. 4. Click "SSH public Keys" in Gerrit's "Settings" interface, paste the keys from the above into the edit box, click "Add" to download the code (italics please fill in according to the actual project) git clone ssh://yourname@10.120.10.101:29418/XXX-BBranchname Workspace(If there is a problem with permission denied (PublicKey) after you add SSH public keys, try executing the command "Ssh-add") Iv. Enter the working directory configuration CD workspacegit config User.Name "Your name" (Gerrit login) git config user.email "[email protected]" (Gerrit registered email address) Curl HTTP://10.120.10.101: 9999/tools/hooks/commit-msg > Git/hooks/commit-msgchmod +x. git/hooks/commit-msg

The development process establishes a private branch that works on a private branch: Git checkout-b private_branch
uploading code to the server 1. Update code base: Git fetch2. Merging new code into private branch: Git rebase remotes/origin/branchname3. Resolving conflicts 4. Push to Server, pending review: Git push Origin head:refs/for/ Branchname5. Direct Push Branch to server (requires permission to push branch, typically only project owner action): Git push Origin Branchname
review do not pass, modify the submission 1. Modify Code 2.git Add Xxx3.git commit--amend4.git push Origin Head:refs/for/branchname

Git+gerrit User Guide

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.