If the .project and .classpath are already committed, then they need to be removed from the index (but not the disk)
git rm --cached .project git rm --cached .classpath
Then the .gitignore would work (and that file can be added and shared through clones).
Note that you could use a "Template Directory" when cloning (make sure your users have an environment variable $GIT_TEMPLATE_DIR set to a shared folder accessible by all). That template folder can contain an info/exclude file, with ignore rules that you want enforced for all repos, including the new ones (git init) that any user would use. ---------------------- 另,你这边rm文件并commit,push之后,别人checkout,会把本地的对应文件删除。 即使文件加入了ignore里。
|