1、git commit --allow-empty “我是一个空白提交” 2、删除git add . 后不想add的文件 在git add 中删除 file.txt文件: git checkout -- file.txt