2

I have a project with gitignore file:

### IntelliJ IDEA ### .idea *.iws *.iml *.ipr Temp* RationalValues* 

https://github.com/hhlTer/quadraticEquation

but .idea directory still pushed in my repository...why?

This makes coding very difficult and inaccessible in branches.


I did add to gitignore all files from .idea, but all files still in repository

### IntelliJ IDEA ### .idea *.iws *.iml *.ipr Temp* RationalValues* compiler.xml encodings.xml misc.xml uiDesigner.xml vcs.xml workspace.xml 
0

3 Answers 3

5

.gitignore will only make git ignore files in your local repository, and will not apply to files already pushed to the remote repo.

If you wish to remove the files from the remote repository, you can use git rm --cached -r .idea

Please also see this answer

Good luck! :-)

Sign up to request clarification or add additional context in comments.

Comments

5

If they are being pushed, it means they were added at some point to your git.

To ignore them, you must remove them from your repository first, commit the changes and then they won't be added again, as they are on the .gitignore.

To remove the files from git without deleting them, you can do: git rm -r --cached .idea

Please, find more about here: http://www.codeblocq.com/2016/01/Untrack-files-already-added-to-git-repository-based-on-gitignore/

Comments

0

You may had a "/" character after each directory reference. To ignore .idea directory, you have to write

.idea/

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.