How to gitignore .idea files

The links in the old posts explaining this are obsolete. 

How do I ignore the .idea files?

Step by step please.. 

Simply telling me to add them to gitignore is not going to help me. Where is gitignore? Do I have to create a gitignore 'file'? Where do I create it? Do I have to create it in every repo I use with rubymine?

5 comments
Comment actions Permalink

Go to File > Settings > Version Control > Ignored Files 


then add your folder or file to git ignore.

hope it helps.

5
Comment actions Permalink

|   Go to File > Settings > Version Control > Ignored Files 
|   then add your folder or file to git ignore.

To be clear, these are two separate steps.  The "Ignored Files" in the first step is an internal ignore list maintained by PHPStorm, separate from GIT.  If you use this function, it WILL lead to errors if you use any other kind of git client on your machine.  JetBrains really needs to change the name of this menu item/function to reflect that it has nothing to do with ignoring the file at the version control level. It ONLY controls whether PHPSTorm will recognize it.  It will still remain in your GIT repo, but simply not display in the PHPStorm interface.  Very confusing.

So when this person says "then add your folder or file to git ignore" he's basically saying, no there's no way for PHPSTorm to handle this for you. You have to do it manually.

4
Comment actions Permalink

Your personal dev tools-related git exclusions (related to YOUR O.S., YOUR editor/IDE, YOUR <whatever>) shouldn't pollute the shared `.gitignore`.

I store mine is `~/.gitignore_global`

Example:

# file: ~/.gitignore_global
.DS_Store
.idea

2
Comment actions Permalink

See this link for suggested contents of a global JetBrains .gitignore file, which you could prune to work for your own case.

https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore

If unfamiliar with github, you'll need to click the `raw` button above the file if you want it in an easy to copy-paste format without the line numbers and frame.

1
Comment actions Permalink

Hello,

.gitignore file is usually placed at the root of your repository. The general documentation you can find here:

https://help.github.com/articles/ignoring-files/

https://git-scm.com/docs/gitignore

0

Please sign in to leave a comment.