[英].gitignore files not ignoring certain files during git push?
看来您的文件已添加到git repo中。
一旦添加了文件(未取消跟踪),将其添加到.gitignore便不会忽略它,因为该文件已经在存储库中,因此您必须将其从存储库中删除,提交文件的删除操作,然后它将被忽略。
# Remove any file you have already commited and you wish to ignore
git rm -rf --cached .idea/*
# now add the ignored pattern to your .gitignore file
git add -A .
# commit and push the removal of the ignored files.
git commit -m "Removed idea files"
git push
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.