Iqbal´s DLQ Help

AUX Folder and Git

Today, I encountered an issue where the folder name aux caused problems in a Git repository. This is because aux is a reserved folder name in Windows.

Typically, someone using macOS or Linux might push a folder named aux into a repository. However, when you attempt to check out the branch containing this folder on a Windows system, you may encounter the following error:

➜ my-repo git:(my_branch) ✗ git checkout branch_with_aux error: invalid path 'config/aux/README.md' # fails switching branches ➜ my-repo git:(my_branch) ✗

Fix

To resolve this issue, you can disable the protection for NTFS reserved names by running the following command:

git config core.protectNTFS false

This command allows Git to bypass the restriction on NTFS reserved names, enabling you to check out the branch without encountering the error.

Last modified: 15 March 2025