How to remove deleted folder from remote repository in Git?

后端 未结 2 1304
醉酒成梦
醉酒成梦 2021-02-19 23:16

i deleted a folder from my local Git repository then i committed and pushed the changes to the remote repository, the files are deleted but the folder and the sub folder are sti

2条回答
  •  梦毁少年i
    2021-02-19 23:33

    You can force git to quit tracking a local file by calling:

    git rm file.txt #warning, this also deletes the file from your filesystem

    You can delete an entire directory (and it's contents) by calling:

    git rm -rf directory

提交回复
热议问题