github-Creating a version Library

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$ pwde:/gitlearngit

pwdThe command is used to display the current directory. On my windows, this warehouse is located in e /Users/michael/gitlearngit . With Windows systems, to avoid all kinds of inexplicable problems, make sure that the directory name (including the parent directory) does not contain Chinese.

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

$ in/users/michael/gitlearngit/.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.

If you don't see the .git directory, it's because the directory is hidden by default and ls -ah can be seen with commands.

github-Creating a version Library

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.