git如何移除某文件夹的版本控制_姜兴琪的博客-CSDN博客

git rm

命令参数

-n --dry-run Don’t actually remove any file(s). Instead, just show if they exist in the index and would otherwise be removed by the command.-r Allow recursive removal when a leading directory name is given. --cached Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone.

解决方法

git rm -r -n --cached "bin/" //-n:加上这个参数,执行命令时,是不会删除任何文件,而是展示此命令要删除的文件列表预览。git rm -r --cached  "bin/"      //最终执行命令. git commit -m" remove bin folder all file out of control"    //提交git push origin master   //提交到远程服务器


Original url: Access
Created at: 2020-02-22 06:55:54
Category: default
Tags: none

请先后发表评论
  • 最新评论
  • 总共0条评论