-
git rm -r -n --cached 文件/文件夹名称 加上 -n 这个参数,执行命令时,是不会删除任何文件,而是展示此命令要删除的文件列表预览。
-
Determine the correct delete files
git rm -r --cached 文件/文件夹名称
-
Submit to local and pushed to the remote server
git commit -m "提交说明" git push origin master
-
Modify local files and submit .gitignore
git commit -m "提交说明" git push origin master