1

I am trying to clone a repo onto a windows 10 machine. It is giving me the following error for several files and ultimately says the clone was successful, but it was unable to checkout. Here's the exact error:

 Invalid argumentreate file wp-content/themes/dt-the7-child/Icon

Any advice? Thanks.

Edit: After going to the files that are throwing errors, they are all empty and they all don't have file extensions. Could either of those be the issue? If so, how could I go about fixing that?

John Harding
  • 432
  • 1
  • 6
  • 14
  • 1
    have you checked out that this [post1](https://stackoverflow.com/questions/26097568/git-pull-error-unable-to-create-file-invalid-argument) [post2](https://stackoverflow.com/questions/17910125/git-clone-unable-to-create-file) – chenrui Jul 01 '17 at 16:28
  • Also, the error message should be create file (invalid argument), right? – chenrui Jul 01 '17 at 16:32
  • Just added an edit. I tried both of those to no avail. All the files throwing errors are empty and don't have an extension. Not sure if that could be the cause – John Harding Jul 01 '17 at 16:41
  • I definitely think it is a file issue, because linux/windows have different file naming policies. Would be better to have some filename to look at. – chenrui Jul 01 '17 at 16:43
  • What do you do that causes this error? What specific steps do you take to "clone the repo"? – Code-Apprentice Jul 01 '17 at 18:58
  • just running a simple `git clone ` – John Harding Jul 02 '17 at 15:08

1 Answers1

3

I believe you are seeing a file named Icon\r, which is a custom icon file for the macOS Finder (the file explorer). The \r is a carriage return, which sometimes shows up as ^M in other contexts. In some contexts this file shows up as Icon?.

In any case, carriage return is not a valid filename character in Windows, so it is refusing to create the file.

You can find some more details about this file in this answer on Super User.

In any case, the file is only relevant to macOS. So if git has an issue with that file, but clones the rest of the repository for you, it's probably fine to just ignore the error. Windows wouldn't use this file for anything anyway.

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112