Files
git-practice-Renejit/README.md
2025-09-04 11:42:03 +05:30

726 B

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.