I have a remote repository with a feature/initital-change branch. Now I want to push some files to this remote branch from my local feature/initital-change branch.
I wen
This can happen when two branches are created, one with a slash / and one without a slash, where the branch without the slash is the prefix of the other branch.
Consider these two valid branch names:
featurefeature/initial-changeWhen you fetch these branches from the remote to your local machine the feature branch is represented as a file and the feature/initial-change branches is represented as a directory named feature and a file named initial-change. Your OS cannot create a file and directory of the same name:
logs/refs/heads/featurelogs/refs/heads/feature/initial-changeThe workaround would be to delete the feature branch in this case:
git push --force origin :feature