Gordon Dickens is an instructor, mentor & consultant. Gordon is currently architecting and teaching several official SpringSource courses and actively tweets about open source technology at http://twitter.com/gdickens. Gordon is active within the Spring Framework community focussed on: Spring training, Spring Roo, Spring Integration, Spring Batch and Eclipse Virgo OSGi projects. Gordon is a DZone MVB and is not an employee of DZone and has posted 39 posts at DZone. You can read more from them at their website. View Full User Profile

Ignoring Files in Git

  • submit to reddit

Quick tip on setting up files to be ignored for your system.

1. Execute the command setting the location of your system level ignore file

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

2. Edit the Global Git Ignore File: ~/.gitignore


3. Peek into your Global Git configuration ~/.gitconfig

name = Your Name
email = you@yourdomain.com
ui = auto
editor = mate
excludesfile = /Users/youruser/.gitignore

Further Reading – for more config options


From http://gordondickens.com/wordpress/2010/12/06/ignoring-files-in-git/

Published at DZone with permission of Gordon Dickens, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Zqudlyba Navis replied on Sun, 2011/01/02 - 7:21am

Which resources do you ignore ? If you're an Eclipse user, you could get a list of resources to ignore from
Window ==> Preferences ==> Team ==> Ignored Resources

Gordon Dickens replied on Mon, 2011/01/03 - 2:09pm

One minor correction: remove the trailing slash from ".springBeans" in the ".gitignore" file because this is a file, not a directory.

Gordon Dickens replied on Mon, 2011/01/03 - 2:12pm in response to: Zqudlyba Navis

Thanks. I just started using the eGit Eclipse Plugin. Do you know if the Preferences > Team > Ignored Resources are discovered by eGit?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.