Last Updated: February 25, 2016
· caherrerapa

Remove IDE files from your git repository but keeping in your local directory

Sometimes when you use an IDE to develop, this adds several files to the working directory. In my case, i use RubyMine or PHP Storm that adds a hidden folder called .idea The problem with this, is that if you push to the origin repository your fellow developers will have merge problems occassionally. To avoid this you need to:

  1. Ignore the file using .gitignore


  2. Remove the files from the git index but keeping in the working directory

    git rm --cached

  3. Commit and Push