11

I committed some files with a name containing ':' and '"' characters, which are invalid on Windows. When I try to git pull from a Windows machine it gives me an error message.

Is there a way to rename these files on the repo from the Windows machine? Or is there any other workaround?

Brad Werth
  • 16,916
  • 9
  • 62
  • 86
mtgred
  • 1,429
  • 14
  • 17
  • 2
    Is there a reason you can't clone the repo onto a Linux machine, rename the files, commit, and push? – cdhowie Dec 06 '10 at 10:05
  • 1
    I don't have access to a Linux machine where I am at the moment. Is there a way to do it from a Windows machine? – mtgred Dec 06 '10 at 11:22
  • I don't have a windows machine to fiddle on. How does the pull fail? Is it in a merge conflict state, where it's fetched the content but can't commit, or does it simply refuse to try? (And is the merge a fast-forward or not?) – Cascabel Dec 06 '10 at 15:14
  • I would recommend doing a `git fetch` instead of `git pull` and trying to work around the problem by only checking out commits which predate the rename. – Tyler Dec 07 '10 at 08:13

2 Answers2

4

If you have an access to a linux machine you can rename it, do the according changes into the code, and push to the repository (with appropriate comment)

Eineki
  • 14,483
  • 6
  • 49
  • 57
2

You could try doing a "sparse checkout" so that you don't check out those files on Windows.

https://stackoverflow.com/a/13738951/316578

Of course, this only works for you if it's okay not to have those files present on Windows.

Anthony Hayward
  • 1,905
  • 19
  • 15