How to Remove .idea Directory from .git

image
Volodymyr Hodiak
January 4, 2020|2 min read|12554 views

How to Remove .idea Directory from .git

If you have accidentally added the .idea directory to .git repository, and you don’t want it to be there, then there is an easy way to remove it. You just have to use the command line and do the following:


# Create file .gitignore
touch .gitignore

# Add .idea to .gitignore
echo '.idea' >> .gitignore

# Remove directory from staging
git rm -r --cached .idea

# Add file to git
git add .gitignore

# Commit changes
git commit -m "Removed .idea from git"

# Push changes
git push
Share

Related articles

image
December 15, 2022|10 min read
Headless CMS Strapi: Why it’s a top choice for business?
Why is Strapi the best headless CMS? One faces many challenges when running an e-commerce business. Yet, some applications and software limit business owners in content management. Seeing typos in...
image
August 10, 2022|9 min read
Healthcare Management System (HMS): Features and Benefits
HMS (Healthcare Management System) AKA Hospital Management Upgrade Over the last few decades, the need to digitize the healthcare services industry has increased immensely. Having a system in plac...
image
July 29, 2022|10 min read
What’s New in Flutter 3.0? The Ultimate Guide For You
Flutter 3 release. What's new? Oh, you’ve heard it right! The new massive Flutter update is here, and it’s world-shaken the whole app development industry. Release of Flutter ...
Interested in other posts?

CONTACT US

By submitting this form I consent to processing my personal data as described in thePRIVACY POLICY

We are open to answer you directly

image
image

Serhiy Lavrynenko

Volodymyr Hodiak

CEO

CTO