Globally ignoring files in git

When using git, it is possible to ignore files using .gitignore. Using your favorite ide, different other files or folders like (.idea, .iml, .settings, .project, .classpath,…) may be created in within the working copy. It is annoying to add the ide specific files manually to the .gitignore for every repository.

But there is a way to ignore all the ide specific files without manually adding them to each .gitignore. Using the option core.excludesfile within the global git configuration makes git to ignore those files in all local repositories. In order to add the option, simply run the following command:

git config --global core.excludesfile ~/.gitignore

Sources

One thought on “Globally ignoring files in git

  1. Your style is really unique in comparison to other folks I have read stuff from.
    Thhanks for posting when you’ve got the opportunity, Guess
    I’ll just book mark this blog.

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.