macos 文件系统 git仓库 大小写敏感设置; git config core.ignorecase

macos 的文件系统不区分文件名的大小写,这样会导致在一个文件夹,当修改一个文件名为大写的时候,git不能感知到。这样使用过程中会出现很多不必要的麻烦。之前设置过,最近使用,发现博客并没有记录,今天备注一下。

解决:

git mv -f OldFileNameCase newfilenamecase # 将文件从git中删除
git config core.ignorecase false # 将repo设置为大小写敏感
git config --list # 查看repo配置是否生效

参考链接:

https://blog.walterlv.com/post/case-insensitive-in-git-rename.html

保持更新,更多内容请关注 cnblogs.com/xuyaowen;

posted @ 2022-02-09 13:20  "Michael_Xu"  阅读(819)  评论(0编辑  收藏  举报