开发者

How to handle files committed to Git on Linux with invalid Windows filenames?

开发者 https://www.devze.com 2023-01-29 14:48 出处:网络
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.

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?


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)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消