-
In a suitable place, create a new folder, right-click in the blank space of the folder, and select "Git Bash Here"
-
Create a file
$ mkdir learn-git //新建一个“learn-git”的目录
$ cd learn-git //
$ pwd //显示当前目录
- Create a new txt file in this directory: readme.txt
- Enter the following command in the pop-up window
$ git init //init命令把这个目录变成Git可以管理的仓库
$ git add readme.txt //add 把文件添加到仓库
$ git commit -m "wrote a readme file" //commit把文件提交到仓库
//-m后面是本次提交的说明