Warning "the following paths have collided" during clone in Bitbucket Cloud

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

The user encountered the below error when performing a clone:

1 2 3 4 5 6 7 8 warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree: 'MMM' 'mmM' 'README.md' 'readme.md'

This warning indicates that there are conflicting file paths on a case-insensitive filesystem. This often occurs on file systems where the distinction between uppercase and lowercase letters in filenames is not significant, such as on some versions of Windows or macOS.

Solution

To resolve this issue following steps are outlined below:

  • Identify the Colliding Paths: The warning should provide information about the paths that have collided. Look at the warning message to identify which files or directories are causing the issue.

  • Rename or Remove Colliding Paths: Once you've identified the colliding paths, you need to rename or remove one of them to resolve the conflict. Choose a consistent naming convention, either by renaming one of the colliding paths or by removing one of them.

To rename the files:

From the above warnings, it is clear that README.md and readme.md files are collided. After cloning there will be only one version of README.md / readme.md.

  • Clone the repository, change the directory and verify if you have a readme.md or README.MD:

    1 2 $ cd reponame $ ls
  • Based on the file, perform the rename. For example, to rename README.md to README_OLD.md.

  • Commit the changes and push to the remote.

    1 2 3 $ git mv README.md README_OLD.md $ git commit -m "renamed" $ git push origin master

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.