1. 在新建代码文件时,不注意把文件名应该小小写搞错了
2. 文件已经push到远程了
3. 在windows下面将文件名字改为全小写

改好后,在Git中没有任何反应,使用git status时,如果遇到下面情况,说明GIT大小写不敏感,如下:

 
1
2
3
4
5
6
[rock@ROCK-PC]$ /d/WampServer/www/hexu.org/code (dev)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
 
nothing to commit, working directory clean

如何解决Git的大小不敏感问题呢?
1. 方案一是设置Git大小写敏感:

 
1
$ git config core.ignorecase false

2. 方案二是先删除文件,再添加进去:

 
1
$ git rm ; git add  ;  git commit -m "rename file"

由于我是与大家共用的仓库,所以我采用的方案2解决掉了。

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ git rm code/library/BuildTag*.php; git status
On branch dev
Changes to be committed:
  (use "git reset HEAD ..." to unstage)
 
        deleted:    code/library/BuildTagAfc.php
        deleted:    code/library/BuildTagAfs.php
 
rock@ROCK-PC /d/WampServer/www/hexu.org/code (dev)
$ git add code/library/BuildTag*.php; git status
On branch dev
Changes to be committed:
  (use "git reset HEAD ..." to unstage)
 
        renamed:    code/library/BuildTagAfc.php -> code/library/BuildTagafc.php
        renamed:    code/library/BuildTagAfs.php -> code/library/BuildTagafs.php

http://blog.hexu.org/archives/1909.shtml

最新文章

  1. 看看国外的javascript题目,你能全部做对吗?
  2. Kafka0.10的新特性一览
  3. Code4App地址
  4. Github账户注册的过程
  5. SQLSERVER存储过程基本语法
  6. POJ 2524 Ubiquitous Religions
  7. 磁盘操作- inode/Block深入实战
  8. 【转】JavaScript中的this关键字使用的四种调用模式
  9. java 堆栈 静态
  10. [转]oracle EBS 基础100问
  11. Myeclipse 搭建Java Web 项目:Servlet 《二》
  12. DOM编程从入门到忘记
  13. Android 开发第一项目——计算器的开发记录
  14. 运用node真机调试移动web项目
  15. Kubenetes---Service--实践
  16. Git&GitHub-基础教程
  17. LaTeX Error: Something's wrong--perhaps a missing \item
  18. KnockoutJs学习笔记(三)
  19. Altium Designer9.4局域网内冲突的问题
  20. JAVA方法参数传递

热门文章

  1. Android 判断当前线程是否为主线程
  2. MSDN 杂志:UI 前沿技术 - WPF 中的多点触控操作事件
  3. mysql 表级锁
  4. [思路]为什么要做一个Web服务器
  5. iphone分辨率终极指南(含有iphone6/6+)
  6. PHP - 操作符与控制结构
  7. C语言,数据类型
  8. Ember.js - About
  9. 编写高质量代码改善java程序的151个建议——[52-57]String !about String How to use them?
  10. Swift - 使用CABasicAnimation实现动画效果