How do I configure GIT to support case sensitivity and to modify uppercase and lowercase letters in filenames? Go

Source: Internet
Author: User

1. When creating a new code file, do not pay attention to the file name should be a small write wrong
2. The file has been push to the remote.
3. Change the name of the file to full lowercase under windows

After you've changed it, nothing happens in git, and when you use git status, git case is not sensitive, as follows:

123456 [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

How do you solve the problem of git size insensitivity?
1. Scenario one is to set git case sensitivity:

1 $ git config core. ignorecase false

2. Option two is to delete the file before adding it:

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

Since I am a warehouse shared with everyone, I used the solution 2.

12345678910111213141516 $ 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< Span class= "Crayon-o" >/hexu.org/code (dev /span> $ 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 - &gt; code/library/buildtagafc.php renamed: code/Library/buildtagafs. php -&GT ; Code/Library/buildtagafs. php

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

How do I configure GIT to support case sensitivity and to modify uppercase and lowercase letters in filenames? Go

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.