Coding⏱️ 2 min read📅 2026-05-31

How to Fix: Git global ignore not working

Git global ignore not working due to incorrect excludesfile path.

Quick Answer: Check if the ~/.gitignore file is in the correct location and has the correct permissions.

The issue you're experiencing occurs because the `.gitignore_global` file is not being used by Git. This happens when the `core.excludesfile` configuration option is set to a non-existent or invalid path.

🚀 How to Resolve This Issue

Method 1: Update the core.excludesfile configuration option

  1. Step 1: Run `git config --global core.excludesfile ~/.gitignore_global` to update the path.

Method 2: Remove the core.excludesfile configuration option

  1. Step 1: Run `git config --global --unset core.excludesfile` to remove the configuration option.

💡 Conclusion

By following these steps, you should be able to resolve the issue and have your `.gitignore_global` file applied correctly.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions