I often have a similar, more general questionning. The problem essentially is :
- which files am I commiting for me?
- which files am I commiting for others?
- → How do I combine both objectives of "versionning"?
I offered discussing this there, so you may find more details about the problem, along with interesting solutions :)
The one I like best is the use of git submodule
: keep your .project
files etc. in a private commit repo. And make your final, pure, essential src
production into a neat submodule
nugget: a public repo.
project/ # root module
| .git # private repo
| .project
| .classpath
| momsNumber.txt
+---src/ # submodule
| | .git # public repo
| | main.java
| +---package/
| | | Etc.java
See there anyway.