How to exclude files or directories with git
In your working copy, open .git/info/exclude.
Say your project contains some sort of data folder at src/main/resources/data and you want to exclude all files in that data directory.
You would add a line like this to .git/info/exclude.
/src/main/resources/data/*
[Click to add or edit comments])
Please prepend comments below including a date