I have 2 branches: master and develop.
In develop I rename the file with git:
git mv Myfile.txt myfile.txt
git add .
git commit -m "Rename file Myfile to myfile"
Now I try to switch branch.
git checkout master
And get an error:
error: The following untracked working tree files would be overwritten by checkout: Myfile.txt Please move or remove them before you can switch branches. Aborting
- File Myfile.txt no longer exists in the working directory.
- I try to change case sensitive settings by git config core.ignorecase, not works.
- I'm working on Ubuntu 16.04
Problem solves only when I return a file to its old name.
Can anyone suggest how to do this in a right way?
UPDATE:
It looks like this issue related to my dev machine - Ubuntu 16.04. It running using Vagrant. All git commands i run when connecting to the machine through ssh. From my MacBook command line, everything works as expected.