美文网首页
gitignore重新生效

gitignore重新生效

作者: Mark_ZSQ | 来源:发表于2021-02-19 11:31 被阅读0次

但是有时在使用过称中,需要对.gitignore文件进行再次的修改。这次我们需要清除一下缓存cache,才能是.gitignore 生效。

进入到项目文件夹,使用git控制台输入:

一.
git rm -r --cached .              #清除缓存 
二.
git add .                         #重新trace file
三.
git commit -m "update .gitignore"         #提交和注释
四.
git push origin master            #可选,如果需要同步到remote上的话

相关文章

网友评论

      本文标题:gitignore重新生效

      本文链接:https://www.haomeiwen.com/subject/wufaxltx.html