- 创建本地git仓库:
cd E:
madir GitDepository
cd GitDepository
git init
- 拷贝需要上传的文件,或者新建文件,查看整个目录
ls -a 如git仓库初始化成功会有 .git文件
mkdir test.txt
- 将文件添加到暂缓区,并查看文件状态
git add test.txt
git status -sb 有A表示已经添加到仓库

- 验证用户
git config --global user.name "git用户名信息"
git config --global user.email "git邮箱信息"
- 将暂缓区的文件添加到本地仓库
git commit -m "提示信息"
git status -sb 查看状态
其他:
git log 查看日志
git diff 查看具体修改的内容
Git使用
原文:https://www.cnblogs.com/luckyqingmu/p/12018147.html