<img src={require('./img/git.png').default} alt="Nife Leadgen Tools - A suite of cloud-based assessment tools for modern businesses" width="1024" height="700"/> # How Case Sensitivity Broke My Build (and What I Learned) A few days ago, I was working on a frontend project that had been building perfectly fine on my **Mac**. Everything looked smooth — no missing modules, no errors, no red lines, yada yada. So I pushed it to GitHub and let my colleague handle the deployment through **GitHub Actions**. But later, I received a message saying: > "Hey, the GitHub Actions build failed — something about a missing component called `tooltip.jsx`?" That didn’t make sense. I opened the project folder, and sure enough, `Tooltip.jsx` was sitting right there. It had *always* been there. So why was the Linux build freaking out? --- ### The Investigation The error said: ``` Module not found: Can't resolve './tooltip.jsx' ``` So I opened my repo and found the file: ``` Tooltip.jsx ``` Looks fine, right? Except... notice the **Capital T**. On my **Mac**, it built just fine, but on the **Linux runner** used by GitHub Actions, it failed. --- ### The Cause ==macOS and Windows are case-insensitive== — meaning: ``` Tooltip.jsx == tooltip.jsx ``` But **Linux is case-sensitive**, so: ``` Tooltip.jsx ≠ tooltip.jsx ``` They’re treated as two *different* files entirely. --- ### The Fix... Or So I Thought I renamed the file to match the import, i.e., `tooltip.jsx`, pushed the commit, and asked my coworker to rerun the build. But to my dismay came the following message... > "Still failing. Did you push the fix?" I checked GitHub — and to my surprise, the same error was there. But I was **sure** I renamed it. What gives? --- ### The Culprit Turns out, **Git doesn’t track case-only renames** on case-insensitive systems like macOS. So when I changed: ``` Tooltip.jsx → tooltip.jsx ``` Git basically went: > "Eh, looks the same to me." and never registered the rename. So the repo never updated, and the CI kept breaking. --- ### The Real Fix Here’s how I finally beat it: 1. **Rename the file temporarily** This forces Git to register a name change. ```bash git mv Tooltip.jsx tmp.jsx git commit -m "Temp rename to force case change" ``` 2. **Rename it again with the correct case** ```bash git mv tmp.jsx tooltip.jsx git commit -m "Fix case sensitivity issue" ``` 3. **Push your changes** ```bash git push ``` --- ### Prevent This from Happening Again If you often face case-sensitivity issues (especially when working between **macOS/Windows** and **Linux**), you can tell Git to track case changes explicitly: ```bash git config core.ignorecase false ``` Run this inside your repo to apply it locally, or add `--global` to make it apply to all your projects. --- ### Takeaway If your builds mysteriously fail on Linux but work fine on your Mac or Windows machine — **check your filenames**. Case mismatches can sneak up on you, and Git won’t always save you. --- *Lesson learned:* > What looks the same to you might not look the same to your CI.