Gitでは、クリーンな作業ディレクトリでブランチを切り替えることができません。代わりに、無視されたフォルダ内のファイルが上書きされることを通知します。
$ git status
# On branch ECP-2229
nothing to commit (working directory clean)
$ git checkout ECP-2243
error: The following untracked working tree files would be overwritten by checkout:
c.t.e.server.logback/bin/logback.xml
Please move or remove them before you can switch branches.
Aborting
この作業ディレクトリのこのフォルダと他のbin/フォルダには何百ものファイルがあり、それらはすべて無視されます。
$ cat .gitignore
bin
どういうわけかファイルはすでに追跡されていると思い、削除しようとしましたが、
$ git rm c.t.e.server.logback/bin/logback.xml
fatal: pathspec 'c.t.e.server.logback/bin/logback.xml' did not match any files
このファイルの何が問題になっていて、どうすればそれが問題ではないことをgitに納得させることができますか?