[英]Hidden folders in .gitignore
I have a hidden folder /.idea
from the IDE that I want to ignore.我有一个来自 IDE 的隐藏文件夹
/.idea
,我想忽略它。 I have followed the patter of https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore but it is not being ignored.我遵循了https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore的模式,但并没有被忽略。
// .gitignore
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
package-lock.json
**/node_modules
# testing
/coverage
# production
/build
# Things that I have tried
.idea/
/.idea/
.idea/**
What would be the way to ignore it?忽略它的方法是什么?
If you already commited your .idea
folder you need to remove it from git index如果您已经提交了
.idea
文件夹,则需要将其从 git index 中删除
git rm --cached .idea
The correct way to ignore a folder inside your .gitignore
file is the following忽略
.gitignore
文件中的文件夹的正确方法如下
.idea/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.