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