Renaming a File for Case Under Git Source Control is not updated by SourceTree on Mac OS X

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

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

When a file has been renamed and only the case has been modified, SourceTree will not reflect this change in it's UI on Mac OS.

Diagnosis

Running a 'git status' will show nothing when you rename a file just for case, and therefore SourceTree does the same.

Cause

The default Mac OS filesystem HFS+ is generally case insensitive. ABC.txt and abc.txt are considered the same file, unlike Linux.

Solution

Resolution

To workaround thisyou can use a temporary file to force the update.

For example if you want to change the case of "kh.png" to "KH.png" you would go to your Git repo from command line and do:

1 2 3 4 5 6 mv kh.png temp.png git add -A git commit -m "renaming kh.png to KH.png" mv temp.png KH.png git add -A git commit --amend -m "Renamed file.txt to File.txt"

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.