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?
windows-10-git.mdGo to Computer Configuration > Administrative Templates > System > Filesystem in gpedit. msc , open Enable Win32 long paths and set it to Enabled .
To resolve this behavior, make sure that the path of the file contains less than 256 characters. To do this, use one of the following methods: Rename the file so that it has a shorter name. Rename one or more folders that contain the file so that they have shorter names.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With