我更改了目录的大小写,但 Git 似乎没有注意到它 [英] I change the capitalization of a directory and Git doesn't seem to pick up on it
问题描述
我正在 OS X Lion 上开发一个受 Git 版本控制的项目.我有这些小写的目录,然后将它们大写(例如 emailaddresses => EmailAddresses),但 Git 似乎无法识别更改.当我运行 git ls-files
和其他命令时,它仍然认为目录是小写的.
I'm developing a project on OS X Lion that is under Git version control. I had these lowercase directories and then later capitalized them (e.g. emailaddresses => EmailAddresses), but Git doesn't seem to recognize the change. It still thinks the directories are lowercase when I run git ls-files
and other commands.
这是无害的,还是我应该做点其他事情让 Git 了解这一变化?
Is this harmless, or should I do something else to get Git to pick up on this change?
推荐答案
您可能正在使用不区分大小写(但保留大小写)的 HFS+.我通常是这样解决这个问题的:
You're probably using case insensitive (but case preserving) HFS+. I usually work round this like so:
$ git mv somename tmpname
$ git mv tmpname SomeName
这篇关于我更改了目录的大小写,但 Git 似乎没有注意到它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!