This is not rocket science but more a reminder for myself 🙂

When working with eclipse and the egit plugin I noticed that a ‘git refresh’ would take minutes in certain projects. The particular project has a few directories containing 10000+ .ogg and .png files which are not included in the git repo. I have git exclude files and global .gitignore files in place but egit seems to ignore them.
So I added the file patterns to the egit ‘Ignored Recources’.

(For example I want to exclude everything in my */lib/Sounds)
Open Window -> Preferences -> Team -> EGit -> Add pattern
The pattern to add: */lib/Sounds/* (duhhh)
Push ‘apply’ and presto, the refresh just takes seconds 🙂

Just for completeness I include my .gitignore_global, the relevant parts and the projects exclude file.
To have the git global ignoring stuff do: git config --global core.excludesfile ~/.gitignore_global

.gitignore_global:
# Custom stuff
*.project
*.pydevproject
*.settings
*.pyc
….
….

The .git/info/exclude file:
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
builder/BtpOS/*/Data/
lib/CPData/DbaseAssets/Images/
lib/CPData/DbaseAssets/Sounds/