Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
November 1, 2013
Chris
Git, Local Development, PHP, PHPStorm
7

Ignore .idea folder from git in PHPStorm

PreviousNext
phpstorm-8

By default (?) PHPStorm will create a hidden folder named .idea directly within your project, containing user-specific stuff like chosen PHP version, syntax highlighting settings etc. This can be quite annoying as these files mess up your git repo and create conflicts when being committed into the repo (as other team members also have their own setting). And beside that, this simply doesn’t belong in there.

 

Make PHPStorm ignore .idea folder

1.) First, make git ignore the .idea folder via Settings (CTRL+ALT+S): In the Project Settings > Version Control > Ignored Files dialog there’s a green “plus” sign on the right, click this and simply add the .idea folder. This screenshot says it all:

ignore .idea with phpstorm

 

2.) Open the “local” terminal in PHPStorm (which is open by default, look at the left bottom of the screen for TERMINAL), make sure you are in your project’s folder and do:

git rm --cached .idea/*

This will remove all files in the .idea folder from Git. Note: From Git ! Not from the system. Don’t confuse rm (which will delete things in linux) with git rm (which will remove files from git’s commit list) ! The result should look like:

ignore .idea folder and files in git with phpstorm

BY THE WAY: Does anyone know how to open the terminal with a shortcut ? Please comment if you like.

 

3.) Now try to commit: PHPStorm should not have the entire .idea folder in its commit list.

result

 

This article was written quite a while ago (9 years), please keep this in mind when using the information written here. Links, code and commands might be outdated or broken.

Random articles

  • PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)
  • What’s new in PHPStorm 9What’s new in PHPStorm 9
  • You made a mess with Git ? Here’s a flowchart guideline on how to fixYou made a mess with Git ? Here’s a flowchart guideline on how to fix
  • A super-simple Vagrant LAMP stack bootstrap (installable with one command)A super-simple Vagrant LAMP stack bootstrap (installable with one command)
  • Get Github’s code colors in PHPStorm (2014 style)Get Github’s code colors in PHPStorm (2014 style)
  • When PHPStorm’s cache eats up your harddisk spaceWhen PHPStorm’s cache eats up your harddisk space
  • PHPStorm 8 has just been releasedPHPStorm 8 has just been released
  • Get Github’s syntax highlighting colors in PHPStormGet Github’s syntax highlighting colors in PHPStorm
  • GitHub introduces revert button / rollback for merged pull requestsGitHub introduces revert button / rollback for merged pull requests
gitgitignoreideaPHPStorm
Share this

7 Comments

  • Spindle
    September 5, 2014 4:52 pm

    Note: By step 2 I had to add “-r”: `git rm –cached .idea/* -r`

    Reply
    • Xroot
      December 17, 2014 4:17 am

      try this instead : git rm -r –cached .idea/*

      Reply
  • gustavo
    April 8, 2014 3:14 pm

    great tip, thanks

    Reply
  • Justin Cook
    March 27, 2014 7:53 pm

    I got an error with that git command and had to add -r, so it’s: git rm -r –cached .idea/*

    Reply
    • Xroot
      December 17, 2014 4:16 am

      well it tell you to add -r to your command : git rm -r –cached .idea/*

      Reply
  • alex
    November 20, 2013 4:58 am

    Owesome!!! You have to replace Kirill Likhodedov in jetbrains who usually just ignores users with regart to this question.

    Reply

Leave A Comment Cancel reply

Interesting stats on SONY’s hacked passwords

In 2011 SONY’s Playstation network got hacked, 77 million accounts have been compromised, and more than 1.000.000 passwords – saved

php

PHP 5.6.0 RC1 is available

The first Release Candidate of PHP 5.6 is available here on php.net, as usual also for Windows systems. The RC

Microsoft announces “holographic” 3D interfaces (promo video)

Microsoft has just announces the damn future in business und consumer electronics! Interactive, “holographic” 3D environments, usable without a keyboard,

MINI2, an extremely simple barebone PHP application on top of Slim

For my daily work I often needed to setup super-simple PHP applications, just some more or less static pages plus

[Link] Improving Smashing Magazine’s Performance: A Case Study

The title says it all: A very interesting guide through the optimization process on one of the largest blogs in

git-php-deployment

Extremely simple deployment with PHPloy

Let me ask you a question: How mad do you get when you have to remember which files you edited

shadow dom

A quick video introduction into Shadow-DOM, the game-changing DOM-subtree-technology

Awesome talk by Eric Bidelman (of the Chrome team): Shadow-DOM was often heard in 2013 and seem to exist for

Create a fast, perfect and bootable 1:1 Windows backup (full clone of HDD) for SSD migration

In this article I want to share a super-simple, extremely fast and totally free workflow with you that will create

PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)

To be honest I’ve not seen the clip yet, but it sounds so awesome and everybody is upvoting it. Have

bitdeli git github stats

Get visitor stats for your GitHub repo with BitDeli

GitHub is the definitive #1 “hoster” for git repositories, no question. And this highly sympathic company has made version control

1/4

Categories

Search

Meet the developers behind Ableton (14min video)
phpstorm-8
Killer-feature in PHPStorm: Search everywhere
GitHub introduces revert button / rollback for merged pull requests
composer
Composer problems ? Try full reset !
Stressed and unrelaxed while coding ? Try some ultra-deeply-relaxing ASMR audio clips. It will change your life. Seriously.
cheap cloud server php
DigitalOcean rolls out interesting feature: Transfering server snapshots directly to the client’s account
angularjs
Two excellent introductions into AngularJS by Todd Motto
js javascript
[video] Netflix JavaScript Talks about ECMAScript 7: The Evolution of JavaScript
Support FLARUM, the future of PHP forum scripts (with some dollars on Kickstarter)
Awesome next-gen PS4 graphics in “The Order: 1886”
phpstorm 7.0 php
A perfect video tutorial to get started with xdebug in PHPStorm
laracon-2014-eu-amsterdam
Laracon 2013 – Kapil Verma: Engineering Complex Applications with Laravel 4 (40min video)
DEF CON 18 – When your computer got stolen and you can still SSH into it: “Pwned by the 0wner” (22min conference talk)
nginx php 5.5
[Link] Set up Nginx with PHP 5.5 easily
Install MINI in 30 seconds inside Ubuntu 14.04 LTS

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy
 
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT