git 提交文件不区分大小写

关于git不区分文件名大小写的处理

2014-10-29 18:27 by Rollen Holt, 743 阅读, 0 评论, 收藏, 编辑

今天遇到了git不区分文件名大小写的问题,一开始着实郁闷了一把。

处理办法:

windows下在git中修改文件的大小写

git mv --force myfile MyFile

//如
   命令 :   git mv --force src/main/webapp/script/controllermodule.js src/main/webapp/script/controllerModule.js

  执行后 ,敲击命令 git status 
     modified:   src/main/webapp/static/script/controllerModule.js
     deleted:    src/main/webapp/static/script/controllermodule.js
      

   效果 : gitlab上文件controllermodule.js被修改成controllerModule.js 
   

或者

git mv -f myfile MyFile

然后commit就好了。当然也可以配置一下git:

Add ignorecase = false to [core] in .git/config;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值