配置gitignore后使其生效命令

改动过.gitignore文件之后,在repo的根目录下运行:

C代码  收藏代码
  1. git rm -r --cached .  
  2. git add .  

之后可以进行提交:

C代码  收藏代码
    1. git commit -m "fixed untracked files" 
原文地址:https://www.cnblogs.com/lxwphp/p/9035635.html