问题:
idea中,Git配置完成后,提交代码到git或gitlab,发现提交了很多冗余文件如:.setting .gradle .idea 等文件
原因:
.gitignore 配置无效
解决方案:
$ git rm -r --cached .
$ git add .
$ git commit -m 'update .gitignore'
在当前项目目录下,右键点击Git Bush Here,执行以上三步后,重启idea即可
本文介绍如何在IntelliJ IDEA中遇到.gitignore配置无效时,通过git rm、git add和git commit操作来清理多余文件,如.setting.gradle.idea,并提供详细步骤。确保项目整洁,提升代码管理效率。
问题:
idea中,Git配置完成后,提交代码到git或gitlab,发现提交了很多冗余文件如:.setting .gradle .idea 等文件
原因:
.gitignore 配置无效
解决方案:
$ git rm -r --cached .
$ git add .
$ git commit -m 'update .gitignore'
在当前项目目录下,右键点击Git Bush Here,执行以上三步后,重启idea即可
1117
1122

被折叠的 条评论
为什么被折叠?