它显示的信息类似于
your local files will be override.......
gitignore 文件有问题吗?
我能做些什么来彻底消除它?非常感谢!
它显示的信息类似于
your local files will be override.......
gitignore 文件有问题吗?
我能做些什么来彻底消除它?非常感谢!
它与它无关,.gitignore这意味着您有未提交的更改,而其他人一直在修改远程存储库中的同一文件。
提交您的更改,然后执行拉取
# add your files to the staging area
git add . (or any other file that you need)
git commit
# now pull
git pull
或者,如果您不想提交:
git stash
# now pull
git pull
我没有提交 .idea 目录中的文件,因为我想将其推送到远程分支,并且这些文件被禁止推送到远程分支。
如果它们已经提交,则从索引中删除它们
# remve the commited files
git rm --cached <file list>
或者,如果您希望将它们从历史记录中完全删除,请使用
BFG - https://rtyley.github.io/bfg-repo-cleaner/

从现在开始使用这个忽略文件:
https://www.gitignore.io/api/intellij