Delete files from git index when they are already deleted from fs

后端 未结 6 2015
一生所求
一生所求 2020-12-12 13:20

I have a bunch of files deleted from the fs and listed as deleted in git status.

How can I stage this changes faster then running git rm fo

6条回答
  •  囚心锁ツ
    2020-12-12 14:13

    You can use git rm --cached "path/to/file" to stage a single deleted file.

    Use git rm -r --cached -- "path/to/directory" to stage a complete deleted directory.

提交回复
热议问题