删除文件
$ git add test.txt
$ git commit -m "initialize test.txt"
[master e175c41] initialize test.txt
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test.txt$ rm -f test.txt$ git status
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: test.txt
#
no changes added to commit (use "git add" and/or "git commit -a")$ git rm test.txt
rm 'test.txt'
$ git commit -m "delete test.txt"
[master b41a08d] delete test.txt
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 test.txtLast updated