Ubuntu18 Simple git server Setup

Source: Internet
Author: User
Tags version control system git clone

First, Introduction

Git (pronounced/g?t/. is an open source distributed version control system that can efficiently and rapidly handle project version management from very small to very large. [1] Git is an open source version control software developed by Linus Torvalds to help manage the development of Linux kernels.

Second, installation

1. Installing the SSH Service

sudo  apt install-  y ssh

2. Install git

sudo  apt install-  y   git

3, in order to simple, directly use the current user to initialize the GIT repository

# initialize git server sudo git  init  --bare  /opt/git/git-test.git# Modify Permissions sudo chmod  777   /opt/git/git-test.git

4, the first three steps, the server's Git repository is built, the client clone remote warehouse, and then enter the login password, you can clone the server's warehouse

# Moy is the username that I initialized the GIT server repository to, then the IP, then the GIT server repository address git clone [email protected] 192.168. 61.12:/opt/git/git-test.git

5. Push the local git repository to the GIT server repository and enter the login password

-U Origin Master

6. Get Git server Repository Master branch to local current branch, enter login password

Git pull Origin Master

Yexiangyang

[Email protected]

Ubuntu18 Simple git server Setup

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.