在我的git存储库中,我将文件(rm)移动到另一个文件夹后手动删除.我并没有把所有的改变都交给我的回购,但现在我做了git status .
ronnie@ronnie:/home/github/Vimfiles/Vim$ 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: plugin/dwm.vim
#
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)
现在,我应该如何提交,以便dwm.vim从我的远程仓库中的插件文件夹中删除.我知道我必须使用,git add && git commit但我没有文件提交/添加,因为/plugin/dwm.vim已经删除.
xda*_*azz 73
使用git add -A,这将包括已删除的文件.
注意:git rm用于某些文件.
Kac*_*che 28
它在输出中说git status:
# (use "git add/rm <file>..." to update what will be committed)
Run Code Online (Sandbox Code Playgroud)
所以只做:
git rm <filename>
Run Code Online (Sandbox Code Playgroud)