xxxxxxxxxx
git refs are files in a directory.
You can't have both a file, and a directory with the same name.
Check that the branch name are not mingled (like an `origin` directory in local branch, )
xxxxxxxxxx
# Change directory to your git repository
cd /path/to/your/repository
# Remove the lock file
rm -f .git/index.lock