Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用rm而不是git rm提交我删除的文件?_Git_Version Control_Rm - Fatal编程技术网

如何使用rm而不是git rm提交我删除的文件?

如何使用rm而不是git rm提交我删除的文件?,git,version-control,rm,Git,Version Control,Rm,git add似乎不适用于这些已删除的文件,那么如何提交更改呢 $ 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 director

git add似乎不适用于这些已删除的文件,那么如何提交更改呢

$ 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")
$git状态
#论分行行长
#未为提交而暂存的更改:
#(使用“git add/rm…”更新将提交的内容)
#(使用“git签出--…”放弃工作目录中的更改)
#
#已删除:ci/ci/\uuuuu init\uuuuuuu.py
#已删除:ci/ci/settings.py
#已删除:ci/ci/url.py
#已删除:ci/ci/wsgi.py
#已删除:ci/manage.py
#
未向提交添加任何更改(使用“git add”和/或“git commit-a”)

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


如果您希望以艰难的方式删除,请在已删除的文件上使用
git rm path/file.py
来分期删除这些文件(即使您已经手动删除了它们)。

您在这里到底想做什么?你想让git在你删除文件的提交中记录吗?相关的post@ColinR i just mv ci directory to be webSo你想将你从
ci
移动到
web
的文件添加到提交中吗?您是否尝试过git add.(这将添加所有未跟踪和未忽略的文件)?的可能重复