[1666207 views]

[]

Odi's astoundingly incomplete notes

New entries | Code

git clone --reference with Cygwin

If you use git clone with the --reference option under Cygwin, the resulting repository will not work with native apps like Eclipse. The reason for that is that the .git/objects/info/alternates file contains an absolute Cygwin path (/cygdrive/c/...) which native apps can not resolve.

Clever solution: edit the file and use a relative path (forward slashes). The path must be relative to .git/objects, so use at least three levels up (../../../) as a prefix. Now the repository works with native apps and from the Cygwin command line.

posted on 2015-05-04 16:58 UTC in Code | 0 comments | permalink