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

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.