Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't clone git repo on windows when some file names contain asterisk

Tags:

git

windows

I have files with the following name in my repository:

*.example.com.crt

The thing is that I can't clone the repository on windows.

error: unable to create file *.example.com.crt (Invalid argument) Checking out files: 100% (6122/6122), done. fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed.

Do you know any workaround for that?

like image 351
Balázs Szántó Avatar asked Mar 17 '23 23:03

Balázs Szántó


1 Answers

Unfortunately, no. Windows disallows certain characters in the filename, and Git will support just about anything, so it's up to you to manage it. I think your best solution is to simply rename the file.

Personally, I'd avoid using * in a filename anyways, since it's a glob character.

like image 132
John Szakmeister Avatar answered Mar 21 '23 05:03

John Szakmeister