Creating a repository is very simple, start by selecting a location that you want to place and creating an empty directory:
(with Windows Git Bash, this tool commands a similar operation to Linux)
$ mkdir gitrespository//Create Directory
$CD gitrespository
$git init//Initialize this directory to an empty local repository
Then we create a TXT file in the Gitrespository directory. Readme.txt, the contents are as follows:
Git is a version control system.
Git is a free softsware.
Be sure to put this file in the Gitrespository directory (sub directory is also OK), because this is a git repository, put somewhere else, git can't find this file
$git Add Readme.txt//adding files to the Warehouse
$ git commit-m "wrote Readme file"//Submit file to Warehouse
[Master (Root-commit) 2141c92] wrote Readme file
1 file changed, 2 insertions (+)
Create mode 100644 readme.txt
Git commit-m The following input is the submission instructions, you can make any content, of course, preferably by meaning, so that you can easily from the history of records to find Change records
Why does git add a file that requires add,commit in two steps? This is because commit can commit many files at once, so you can add different files multiple times, such as:
$git Add File1.txt
$git Add File2.txt
$git Add File3.txt
$git commit-m "have commited add 3 files"
How Git creates a local library and submits files to a local library