title: Git removes file when switching branches
body: <p>If I checkout a git branch, sometimes a file <code>path/to/File</code> is deleted. I can see this as an unstaged change after the operation. It is always the same text file, which has not been edited for a long time. So it should be the same file at each branch.  (But one branch calls it <code>path/to/file</code>.)</p>
  <p>Usually I use Atlassian Sourcetree for switching branches, but the problem has also appeared on our gitlab ci/cd runner, which may use simple git command line commands.</p>
  <p>The problem emerge at various clones of the repository and with various branches.</p>
  <p>Is the repository somehow corrupted? Any idea how to resolve the problem?</p>