I like clean and simple files/code. So, I am using a global .gitignore depending on the machine settings ( IDE &|| OS Specific...). excerpt:
# exclude OSX Files
.DS_S开发者_运维技巧tore
# exclude Logfiles
*.log
# exclude Netbeans project files
/nbproject
Netbeans git support is improving and that's ok, but since 7.0 NB it is driving me crazy.
Every time I modify code in my project NB modifies the projects .gitignore as well and adding:
/nbproject
to the gitignore.
How do I stop Netbeans doing this, without deactivating the git support?
As VonC said, this is an issue with the git module, not with anything you can do (except write a patch)
I recommend you star this issue: http://code.google.com/p/nbgit/issues/detail?id=74
And await a response.
Also, I am not too familiar with the source code, but you could do an inefficient workaround while you wait for a fix:
private PathPatternList getRepoPatternList() {
File gitInfoExclude = new File(new File(repo.getDirectory(), "info"), "exclude");
return getPatternList(gitInfoExclude, "");
}
Just edit the above with an if(gitInfoExclude==) and then put in the directory exception you want to add.
精彩评论