Git Easy Guide Three--Create a repository

Source: Internet
Author: User

What is a repository? Repository also known as the Warehouse, English name repository, you can easily understand a directory, all the files in this directory can be managed by git, each file modification, deletion, git can track, so that any time can track history, Or you can "restore" at some point in the future.

Therefore, it is very simple to create a repository, first of all, select a suitable place to create an empty directory:

$ mkdir learngit$ CD learngit$ pwd/home/exbot/learngit//login user is Exbot

This warehouse is located in/home/exbot/learngit

The second step is to git init turn this directory into a repository that git can manage by command:

$ git initinitialized empty git repository in/home/exbot/learngit/.git/

Instantly Git has built the warehouse, and tell you is an empty warehouse (empty Git repository), careful readers can find the current directory is a directory of more than one, .git this directory is git to track the management of the repository, it's OK don't manually modify the directory inside the file , or change the mess, the Git repository to destroy.

Attention:

You don't have to create a git repository in an empty directory, and it's also possible to choose a directory that already has something. However, it is not recommended that you use the company project you are developing to learn git, otherwise you will not be responsible for any consequences.

Git Easy Guide Three--Create a repository

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.