Git pull error: unable to create file (Invalid argument)

I am trying to sync remote repo with local repo but getting following errors. Some files (which have not extention) are not getting sync with local repo on WINDOWS machine, but I could sync successfully on MAC machine.

Is there any configuration settings in WINDOWS to handle such case?

  • Git diff fails on file with underscore in path
  • How to apply a Git patch to a file with a different name and path?
  • git on mac osx: how to push filename cases to origin?
  • How do you specify git URLs with spaces on Windows under cygwin?
  • How to apply a patch in Git which contains filename case changes?
  • Change case of a file on Windows?
    1. Using TortoiseGit
    2. Windows 7 64 bit machine


    git.exe clone     --progress -v  "" "C:\Data\GitHub\simility\vishesh-common"
    Cloning into 'C:\Data\GitHub\simility\vishesh-common'...
    POST git-upload-pack (200 bytes)
    remote: Counting objects: 3912, done.
    remote: Compressing objects: 100% (487/487), done.
    Receiving objects: 100% (3912/3912), 2.70 MiB | 567.00 KiB/s, done.
    Resolving deltas: 100% (1578/1578), done.
    remote: Total 3912 (delta 409), reused 0 (delta 0)
    Checking connectivity... error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030050305_fantasy-trilogy-spin?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030295038_laser-dogs?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030315317_arizona-native-bird-painting-series?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030315317_native-birds-ii?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030552097_ikeyboard-0?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030552097_ikeyboard?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030552097_only-you-can-prevent-computercide?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030552097_vector-cupholder-protect-your-laptop-and-your-lap?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_103055429_death-of-an-angel?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030650665_rachel-vanslyke-making-a-new-record-together-we-ca?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1030835091_russian-trucks-of-world-war-two?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1031873800_prop-expansion-next-level?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1031873800_prop-project-expansion?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1099860912_yaw-clock?ref=users (Invalid argument)
    error: unable to create file kickstarter/parsers/data/kickstarter/campaigndetails/_projects_1099992656_heavenly-sight-a-vision-out-of-blindness?ref=users (Invalid argument)
    fatal: unable to checkout working tree
    warning: Clone succeeded, but checkout failed.
    You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'
    git did not exit cleanly (exit code 128) (21746 ms @ 29-09-2014 13:32:13)

  • Git cloning stucks on receiving objects
  • How to get Gerrit: Code Review to output email diffs on successful commit
  • Cherry pick shows no -m option was given error
  • Git commits missing when cloning via SSH
  • How to set up git server WITHOUT ssh auth
  • Cloning a subversion project from google code using git
  • 2 Solutions collect form web for “Git pull error: unable to create file (Invalid argument)”

    If I read that log well, those files have names that end with “?ref=users”

    Windows does not allow you to have a ‘?’ in a filename, just like it does not allow to have a “\” or “*”. Under Linux it is possible, if you escape those characters. On Windows, I think it’s not possible at all. See

    You will have a hard time with such names.. I actually can’t come up with any idea that would allow you to sync that 1:1. You certainly can fetch them and save them under some safe names like _projects_1099992656_heavenly-sight-a-vision-out-of-blindness__ref=users but I don’t know how to do that automatically, or how to later inform Git about that mapping, sorry..

    These filenames look like they have a HTML-query-parameters suffixed to them. Is it really required? maybe that’s just some artifact that could be removed? try talking to the mantainers of the project, maybe they will be able to simply remove that odd suffix?

    I ran into the same problem, but wasn’t willing to rename or delete these files. So here’s a workaround in case you can live without accessing those files using a sparse-checkout:

    Go to the .git folder in your repo and open the file config. (You can also edit your configuration using tortoise-git, but I havn’t got it installed here.) In the [core]section add the line

    sparsecheckout = true

    then go to the folder .git/info and create the file sparse-checkout. Add something like


    The first line includes everything, while the second excludes all files in kickstarter/parsers/data/kickstarter/campaigndetails/. You should now be able to checkout the repo. Using wild-cards you can probably do more sophisticated excludes.

    Git Baby is a git and github fan, let's start git clone.