Git configuration for Android development

Source: Internet
Author: User

Git configuration for Android development

1. First GIT configuration:

Enter the command:

git config--global user.name "xxx.xx"

git config--global user.email "[Email protected]"

git config--global commit.template "/home/xxx/commit.template"

Change the name to your own.

You can see whether the command is configured via git config--global--list:

user.name=xxx.xx

[Email protected]

Commit.template=/home/xxx/commit.template

2. Configure SSH:

Enter the command:

Ssh-keygen

Then all the way back to the end, to the root directory in the. SSH folder,

Enter the command:

Touch Config

Create a new config file and add the following:

Host 192.168.10.x

User xxx.xx

Port 29418

Identityfile ~/.ssh/id_rsa

Host 192.168.10.xx

User xxx.xx

Port 29418

Hostname 192.168.10.xx

Identityfile ~/.ssh/id_rsa

Host 192.168.10.xxx

User xxx.xx

Port 29418

Hostname 192.168.10.xxx

Identityfile ~/.ssh/id_rsa

Don't forget to modify user.

Copy all of the contents of the id_rsa.pub to the Gerrit, and the above three servers will have to add SSH public Keys. Enter the address of the host behind the browser to log on to the server if no account is registered on the server.

SSH Public keys location in setting:

Click Add key to copy the copied content, as follows:

Click Add to be OK.

Back to the server, repo code will appear when prompted, enter Yes to return.

Git configuration for Android development

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.