0

Possible Duplicate:
Git is deleting an ignored file when i switch branches

Precondition: Config files are included in .gitignore removed from every branch.

Problem: Config files that should are not in the repo are deleted when I switch from branch to branch.

What triggered the issue: Config files were added to repo once and then removed with git rm --cached <file>

Any help would be appreciated, I add the files again and again, but when I switch to another branch they get deleted. thanks.

Community
  • 1
  • 1
simple
  • 149
  • 13
  • Are you sure the file is not in any of the branches? – svick Dec 10 '11 at 18:05
  • There's *no way* Git is touching an untracked file. It's tracked in the branch you're switching away from, but not the one you're switching to. Use `git log ` to see how it got (back) in. – Cascabel Dec 10 '11 at 20:08
  • You have to remove them from index in your other branches aswell. See https://stackoverflow.com/a/55532030/2311074 – Adam Apr 05 '19 at 11:08

0 Answers0