Git 简易使用指南

0. 安装Git并打开CMD

【初始】

1. 进入目录

cd D:project

2. 初始化

git init

4. 远程拉取至本地

git pull https://github.com/netcrashed/test.git

5. 本地添加至远程

git remote add test https://github.com/netcrashed/test.git

【提交】(常见解决:src refspec master does not match any)

6. 缓存添加文件

git add *

7. 缓存添加注释

git commit -m 'upload'

8. 远程设置分支(首次)

git push --set-upstream test master

9. 推送

git push test

大佬有話說 (1)