Updated Readme
This commit is contained in:
12
README.md
12
README.md
@ -1,13 +1,5 @@
|
||||
Why Git Doesn't Track Case-Only Rename
|
||||
|
||||
Git is case-sensitive but relies on the filesystem. Case-insensitive filesystems (e.g., macOS APFS, Windows NTFS) treat readme.md and README.md as identical, so no change is detected.
|
||||
|
||||
1.Steps to Make Git Recognize the Rename
|
||||
2.Rename to a temporary name: git mv README.md temp.md.
|
||||
3.Rename to desired case: git mv temp.md README.md.
|
||||
4.Verify: git status shows the rename.
|
||||
5.Commit: git commit -m "Rename readme.md to README.md".
|
||||
|
||||
Why This Happens
|
||||
|
||||
Git uses filesystem system calls to detect changes. Case-insensitive filesystems report no difference for case-only renames, so Git's index isn't updated. core.ignorecase (set to true on such systems) aligns Git with filesystem behavior.
|
||||
|
||||
To change the file name we use the force Rename command : git mv -f readme.md Readme.md
|
Reference in New Issue
Block a user