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?

6
  • 1
    have you checked out that this post1 post2 Commented Jul 1, 2017 at 16:28
  • Also, the error message should be create file (invalid argument), right? Commented Jul 1, 2017 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 Commented Jul 1, 2017 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. Commented Jul 1, 2017 at 16:43
  • What do you do that causes this error? What specific steps do you take to "clone the repo"? Commented Jul 1, 2017 at 18:58

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.