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