Answer the question
In order to leave comments, you need to log in
How to make git not see .idea?
I'm starting to use git at work. I liked it very much. But I can't handle one problem:
PHPStorm has an .idea folder where the editor saves configurations. With any operation, the values \u200b\u200bthere change, and git takes all this into account, which is terribly disturbing. Especially when merging branches.
Added to .gitignore: .idea/*
But it doesn't help. How to make git forget that this folder even exists. I've been suffering for 3 days now.
Answer the question
In order to leave comments, you need to log in
First, remove the folder from git: git rm -r --cached .idea
The .gitignore should just be .idea/
without the asterisk. Example . By the way, there is a plugin
for .gitignore in PhpStorm .
If you do as Nazar Mokrinsky advised , then the files will be ignored only when working with git through PhpStorm, which, in general, is a serious limitation. Then it's better to use .git/info/exclude, but all these ways to opt out of gitignore are, let's say, not popular .
The .idea folder is your local environment, it should not be mentioned in the repository, you do not need to put it in .gitignore.
Here's what to do:
My .gitignore looks like this:
# IntellijIdea files
*.iml
.idea
out
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question