To make Git record a filename change that only alters capitalization—such as readme.md to README.md—run git mv from the repository in Terminal, then check the staged change with git status. On many Macs, the default APFS format preserves filename case but does not distinguish names by case, so a Finder rename or ordinary mv may leave Git unable to recognize the difference. Apple notes that APFS can also be formatted as case-sensitive, so behavior depends on the volume. Apple Developer: Files and directories

Rename a tracked file with git mv

In Terminal, move to the repository that contains the file. Replace the example paths below with the exact current and desired paths. Quoting each path is good practice if a name contains spaces or shell metacharacters.

git mv 'src/readme.md' 'src/README.md'
git status

Git’s git mv command renames the working-tree path and updates the index; the change is staged, but it still needs a commit. The Git manual requires the source path to exist and describes the index update as occurring after a successful move. GitHub’s documented command-line workflow likewise recommends checking git status after git mv. git-mv documentation GitHub Docs: Renaming a file

If successful, inspect the status output for a staged rename from the old path to the new one. Review the full staged change before committing, especially if you also edited the file:

git diff --cached --summary
git diff --cached -- 'src/README.md'

The summary helps confirm the path change; the second command lets you inspect staged content for that path. Git may display a rename as a deletion and an addition in some contexts because rename presentation is inferred from file contents and history. The essential check here is that the index contains the desired path and no unintended staged changes.

If a direct case-only rename fails

Some case-insensitive volumes or Git setups do not accept a direct move whose source and destination differ only by capitalization. Use a temporary name with a different spelling, then move that temporary path to the final name:

git mv 'src/readme.md' 'src/readme-case-tmp.md'
git mv 'src/readme-case-tmp.md' 'src/README.md'
git status

The temporary path must not already exist. After both commands, confirm that status shows only the intended old-to-new rename and check the staged diff. The two-step method gives the filesystem an intermediate name to distinguish, while git mv updates Git’s index at each successful step. If either command reports an error, stop and inspect git status and the directory before retrying; do not add -f unless you have confirmed that overwriting the destination is intentional.

Check the repository’s case handling

Git’s core.ignoreCase setting enables workarounds for filesystems that do not distinguish letter case. Git documents that clone and init probe the filesystem and set this value when appropriate; it also warns that changing it can cause unexpected behavior. You can inspect the effective setting with: git-config documentation

git config --get core.ignoreCase

If no value is printed, this command has not found a setting in the effective configuration. Avoid treating git config core.ignoreCase false as the fix: it changes Git’s assumptions, but does not make a case-insensitive macOS volume able to store two same-directory names that differ only by case. The documented purpose of the setting is to help Git work with the actual filesystem behavior, not to change that behavior.

Confirm, commit, and share the rename

Before committing, verify the final spelling in git status, inspect the staged summary, and check that unrelated changes are not included. When the staged rename is correct, commit it with a clear message:

git commit -m "Rename readme file to uppercase"

If you intend to share the commit, push the branch using your repository’s usual remote and branch workflow. The rename is recorded in the commit; a remote will receive it only after you push. On a case-sensitive APFS volume, case-only names can be distinct, while the default case-insensitive configuration treats them as the same name. The reliable local check remains that Git’s index and staged status show the intended destination path. Apple Support: File system formats available in Disk Utility on Mac

Sources