I've had the following two issues with a few local Git repositories on macOS 10.15.1 using Git 2.25.0, and I am not sure what causes this to happen:
The status of some or all files in a repository is removed and added, but there are no changes (not even line endings) between the removed and added file versions
Files get duplicated, e.g. if I have a file called
coverage.json
, an identical file calledcoverage 2.json
is created. Sometimes additional copies such ascoverage 3.json
are also created
Solutions I've tried:
- Upgrading Git from the default macOS install to the 2.25.0 using Homebrew
- Removing git-related extensions from VS Code
- When files are removed and added, committing the changed. This just pushes off the issue—a short time later files will somehow show as removed and added again
The only solution I've found is either continually delete files and revert changes, or start a new, clean project. However, even on new projects this issue sometimes arises again.