Build a git remote repository (that is, the GIT server, no need to connect to GitHub again)

Source: Internet
Author: User

Generally, the hosted code on GitHub is public. Anyone can view, copy, and download the code. Private Projects are charged. Therefore, you can build a git service for your own use.

First install git:

Sudo apt-Get install git

After installation, createBareWarehouse

Git init -- bare # create a raw git Repository

Note: DifferencesGit initAndGit init -- bareDifferences:

Git init is used to create a repository to store the project source code. After git init, The. Git folder and project source code will appear in this directory in the future.

The effect of git init -- bare is similar to that of git init, but only the. Git folder will be stored to keep the change information, without the project source code.

The biggest difference between them is:

Git init-the bare repository created by bare can be operated by many people, while git init allows users to play locally.

That is to say: git init -- bare is used on the GIT server, while git init is used on the local machine of the user. There is a warehouse created with bare on the server, which is mainly used to connect, synchronize, coordinate, and record the small warehouse on individual computers without storing the project source code. Each developer has a small warehouse on his/her own computer to store the project source code and make changes.

 

Build a git remote repository (that is, the GIT server, no need to connect to GitHub again)

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.