Cygwin Git with Windows paths

Brian Inglis
Sun Nov 18 16:49:00 GMT 2018

On 2018-11-18 01:35, Ray Donnelly wrote:
> On Sun, Nov 18, 2018, 6:07 AM Steven Penny < wrote:
>> Cygwin Git can clone with Unix form paths:
>> $ git clone git:// /tmp/goawk
>> Cloning into '/tmp/goawk'...
>> remote: Enumerating objects: 330, done.
>> However it fails with Windows form:
>> $ git clone git:// 'C:\cygwin64\tmp\goawk'
>> Cloning into 'C:\cygwin64\tmp\goawk'...
>> fatal: Invalid path '/home/Steven/C:\cygwin64\tmp\goawk': No such file or 
>> directory

Use cygpath:

$ git clone git:// `cygpath 'C:\cygwin64\tmp\goawk'`

>> and mixed form:
>> $ git clone git:// C:/cygwin64/tmp/goawk

$ git clone git:// $(cygpath C:/cygwin64/tmp/goawk)

>> fatal: Invalid path '/home/Steven/C:/cygwin64': No such file or directory
>> Note that other Cygwin programs work fine with these forms:
>>     $ ls 'C:\cygwin64'
>>     bin         Cygwin.ico           dev  home  sbin  usr
>>     Cygwin.bat  Cygwin-Terminal.ico  etc  lib   tmp   var

If Windows paths work, that's convenient; if Windows paths don't work, use
cygpath, as it is often required, that's why it's available.

>> This causes problems for any non-Cygwin tools that might call Git:

> This is very much the point of msys2.

Also Git for Windows (MinGW based) which tries to provide a more compatible
experience without msys2 DLLs; and which can also be installed under msys2.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list