DEV Community

Heru Hartanto
Heru Hartanto

Posted on

5

Set Git to Recognize Case Changes

By default, Git is case-insensitive, which can cause issues when renaming files by changing only their capitalization, e.g., flag.svg to Flag.svg.

To fix this, set core.ignorecase to false in your terminal:

git config --global core.ignorecase false
Enter fullscreen mode Exit fullscreen mode

This global setting ensures Git detects case-sensitive changes in all repositories. To apply it only to a specific repository, run the command without --global.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay