Dealing with repositories with paths containing Aux on Windows
Git enables generally smooth inter-operation between Unix and MS Windows systems, but there are some pitfalls. One is that MS Windows (inherited from MS-DOS) has a number of reserved names:
CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9
Paths containing these words (remember Windows is not case-sensitive)
are invalid. Hence if you have a repository with say a path such
src\aux\t1.c
it will not be possible to check it out in
entirety.
However Git has relatively recently acquired the capability to checkout only a subset of the repository, i.e., “sparse-checkout”.
If you don’t need the parts of working trees with reserved names in path names, it is possible to use following commands to create a good checkout and work as normal:
git clone --no-checkout <repo>
cd <repo>
git sparse-checkout init --sparse-index
git add <somepaths without reserved words>
git checkout main