本地文件 >>>>>> 缓存区 >>>>>> 仓库
一 本地仓库
1.配置用户名和邮箱
git config --global user.name "Taysem" git config --global user.email "1580011497@qq.com"
2.初始化一个仓库
1.创建文件夹 test 2. 进入到文件夹test cd test 然后在git init
3.向仓库添加文件
1.创建文件 touch test.py 2.查看状态, git status 3.提交文件: git add test.py 到缓存区 4.将文件从缓存区提交到仓库: git commit -m ‘test.py‘
4.修改仓库文件
1. 查看一下状态: git status 2. 编辑文件: vi test.py (同linux) 3.提交文件: git add test.py 到缓存区 4.将文件从缓存区提交到仓库: git commit -m ‘test.py‘
5.删除文件
1. 删除文件 rm -rf test.py 2. 从git中删除文件: git rm test.py 3.提交描述: git commit -m ‘描述信息‘
二 远程仓库
原文:https://www.cnblogs.com/taysem/p/12061205.html