How to handle files committed to Git on Linux with

2020-02-10 05:37发布

问题:

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?

回答1:

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)



回答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.