In keeping with the advice from this question: Ignore files that have already been committed to a Git repository
We did the following:
git rm -r --cached .
git add .
$ git commit -m".gitignore is now working"
On branch master
Your branch and 'origin/master' have diverged,
and have 2 and 24 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
git commit -m".gitignore now works"
git pull
git says:
$ git pull
error: The following untracked working tree files would be overwritten by merge:
dir/.classpath
How do we force git to ignore the .classpath file?