-2

git add seems not works for these deleted files, so how to commit the changes?

$ 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:    ci/ci/__init__.py
#       deleted:    ci/ci/settings.py
#       deleted:    ci/ci/urls.py
#       deleted:    ci/ci/wsgi.py
#       deleted:    ci/manage.py
#
no changes added to commit (use "git add" and/or "git commit -a")
4

1 回答 1

2

最简单的选择是使用git add -A. 该-A选项将暂存添加和删除的文件。

如果你想要它,git rm path/file.py请在已删除的文件上使用来暂存它们的删除(即使你已经手动删除了它们)。

于 2012-09-26T01:33:52.070 回答