
July 27, 2023
Table of Contents
When working with Git, you may notice that some commits show changes unrelated to your code — especially modifications to file permissions such as the executable bit. These permission-only changes often appear like this:
100644 → 100755Although minor, these variations can clutter your commit history and even cause merge conflicts. This is particularly common when collaborating across Linux, macOS, and Windows, where file modes behave differently. If your project doesn’t rely on executable scripts, these permission changes are unnecessary and frustrating.
Thankfully, Git provides a clean way to disable permission tracking completely.
Why Git Tracks File Permissions
Git tracks two things for every file:
File content
Executable bit (chmod +x or not)
It doesn’t track full Unix permissions — only whether a file is executable.
This behavior becomes problematic when:
Contributors use different operating systems
Text editors auto-adjust file modes
Deployment scripts modify permissions
You accidentally change a file’s mode
These situations cause Git to show irrelevant diffs.
How to Stop Git from Tracking Permission Changes
Git includes an option called core.fileMode, which determines whether Git should monitor file permission changes.
To stop tracking permission changes, set:
core.fileMode = falseYou can apply this globally or only to a specific repository.
1. Disable File Mode Tracking Globally
This prevents Git on your machine from tracking permission changes for any repository:
git config --global core.fileMode falseIdeal if you switch between OS environments.
2. Disable File Mode Tracking for a Single Repository
Inside your project directory:
git config core.fileMode falseThis affects only the current repository.
3. Add Setting Directly in .git/config
Open the file:
.git/configAnd under [core] add:
fileMode = falseSame effect as running the CLI command.
4. Verify the Setting
Use:
git config --get core.fileModeIf you see false, Git will now ignore executable-bit changes.
If Git Still Shows Permission Changes
Try refreshing the index:
git update-index --really-refreshOr reset file modes:
git add --chmod=-x <file>Important Notes
Git ignores permission changes but not real system permissions
Your OS file permissions remain untouched.
Only executable bit is ignored
Git still won’t track read/write/ownership bits — it never did.
Useful for cross-platform workflows
Windows users especially benefit from disabling fileMode.
Keep fileMode enabled if your project uses scripts
Projects containing .sh files, deployment scripts, or CLI tools depend on executable bits.
When Should You Disable fileMode?
Disable it if:
You collaborate across different OS environments
You want clean diffs
Your app doesn’t rely on executable scripts
Your editor keeps altering file permissions
Keep it enabled if:
You maintain shell scripts
You manage deployment tools
Your CI/CD pipeline relies on executable files
Conclusion
Git file permission tracking often causes unnecessary noise in your commit history—especially when working across multiple operating systems. By configuring core.fileMode to false, you ensure Git focuses on meaningful code changes while ignoring irrelevant permission differences. This leads to cleaner commits, fewer conflicts, and a smoother development workflow.
For more practical development tips, tools, and advanced technical guides, you can explore insights shared by an experienced web developer in Nepal who regularly publishes high-quality programming and backend engineering content.

