CentOS builds git server and client

Source: Internet
Author: User

The CentOS build git needs to set up remote server and client. Remote code resides on the server side, and multiple clients can share and maintain service-side code.

First, server-side host

1. Create SSH, most of which are installed by default and have SSH skipped

Yum Install Openssh-server-y

2. Install git

Yum-y Install Git-core

3.1 Creating a Git user

Useradd git

3.2 Setting a password

passwd git

4. Git User Login

Su git

5. Initializing the server-side warehouse

Cd/home/git
Git init-–bare web.code.git

Web.code.git for the library name

Assume that the server IP is 192.168.1.222,git service address is: [E-mail Protected]:/home/git/web.code.git

The server is OK.

Second, the client computer

1. Install git

2. Cloning server-side repositories

git clone [email protected]:/home/git/web.code.git web.code

Clone the server-side warehouse and place it in the local directory Web.code.

3. Basic Configuration

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

git config--global user.name "user_name"

4. Now it's ready to use.

The default is only the Master branch. We can create our own branches, create files, submit files, merge branches, and submit them to the server.

CentOS builds git server and client

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.