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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

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. 

診断

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

原因

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

ソリューション

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:

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"

 

 

最終更新日: 2016 年 2 月 23 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.