Ignore .idea on commit

General

Working with jetbrains IDE, It will pop .dea directory every time you commit, you can ignore it every time by unckheck it — but it’s the best deal.

Solution

You can solve it by let git ignore it forever by adding .dea to .gitignore file in your project directory.

First, change directory to your project directory (or same level to .idea directory) and run the following command.

On Windows

echo .idea >> .gitignore
git rm -r --cached .idea
git add .gitignore
git commit -m "(some message stating you added .idea to ignored entries)"
git push

On Linux

echo '.idea' >> .gitignore
git rm -r --cached .idea
git add .gitignore
git commit -m '(some message stating you added .idea to ignored entries)'
git push

 

Leave a Reply

Your email address will not be published. Required fields are marked *