Skip to content

Instantly share code, notes, and snippets.

@juliencrn
Created May 30, 2019 13:37
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save juliencrn/26e6b54105f41470ee27160e1eacb123 to your computer and use it in GitHub Desktop.
Save juliencrn/26e6b54105f41470ee27160e1eacb123 to your computer and use it in GitHub Desktop.
Remove .idea files from PHPStorm with git & .gitignore
# Remove the file from the repository
git rm --cached .idea/
# now update your gitignore file to ignore this folder
echo '.idea' >> .gitignore
# add the .gitignore file
git add .gitignore
git commit -m "Removed .idea files"
git push origin <branch>
@tiagovizoto
Copy link

Remove the file from the repository

git rm --cached .idea/

now update your gitignore file to ignore this folder

echo '.idea' >> .gitignore

add the .gitignore file

git add .gitignore

git commit -m "Removed .idea files"
git push origin

@artshevtsov
Copy link

Git may require -r flag:
git rm -r --cached .idea/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment