I am working on PhpStorm. There are some files/folders that I would like git to ignore. These are on the remote repository, too. I just don't want to reflect any more changes about them but they have to stay - not be deleted - from remote repo since I am going to pull from this repo to the production server.
- I have added them to the .gitignore file which is in the project root.
- I have added them to PhpStorm Settings > Version Control > Ignored Files section as described here https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000154070-How-to-gitignore-idea-files
- How to ignore files which are in repository? this question describes my problem exactly, yet I have tried both methods which are described in the accepted answer, here is what happened:
git rm -r --cached .idea/
I did this and related files/folders were deleted from my remote repository too, which I don't want because I think it will result in deleting those when I pull on the production server.git update-index --assume-unchanged .idea/
I did this, "Ignoring path .idea/" was written in the terminal, I hoped that it would work but when I wanted to commit, I saw that folder again as tracked.
What am I doing wrong?
Note: .idea folder may not be important for the production server, but there are some important folders needed for the code to run.