git 常用命令

1.撤销上一次提交并将暂存区文件从新提交

git commit -- amend

2.取消全部操作

git checkout -- .

3.查看当前是否有改变的文件

git status

4. 将工作区文件添加到暂存区

git add .

5.再次查看文件状态

git status

6.提交

git commit -m "first commit"

7.查看提交

git log

8.删除

git rm filename

原文地址:https://www.cnblogs.com/hd-test/p/11737270.html