I'm trying to use git to more effectively manage working on project which uses CVS for its source control, but I'm having problems add
-ing a file which has a very long path indeed - 276 characters.
Unfortunately, this file is generated by the custom IDE the tool I'm using is shipped with and it's expected to be there by the tool, so can't be renamed or moved.
Using the following to try to make this semi-readable:
<projectpath>
- the path holding all components for this project
<hugepath>
- the path from <projectpath>
to the first file I'm having problems with
<filename>
- the name of the file I'm having problems with
me@work <projectpath>
$ git init
Initialized empty Git repository in <projectpath>/.git/
me@work <projectpath> (master)
$ git add <hugepath>/<filename>
fatal: unable to stat '<hugepath>/<filename>': No such file or directory
me@work <projectpath> (master)
$ ls -al <hugepath>
ls: <hugepath>/<filename>: File or path name too long
total 3
drwxr-xr-x 3 me Administ 0 May 3 2010 .
drwxr-xr-x 4 me Administ 4096 May 3 2010 ..
drwxr-xr-x 2 me Administ 0 May 3 2010 CVS
The msys tools work with paths using the UNC prefix which usually lets you work with long files on windows, but this doesn't seem to get around the path limitation:
me@work <projectpath> (master)
$ git add //?/<projectpath>/<hugepath>/<filepath>
fatal: Too long path: //?/<projectpath>/<hugep (intin - the path displayed is trimmed)
me@work <projectpath> (master)
$ ls-al //?/<projectpath>/<hugepath>/
ls: //?/<projectpath>/<hugepath>/.: No such file or directory
ls: //?/<projectpath>/<hugepath>/<filepath>: No such file or directory
total 2
drwxr-xr-x 4 me Administ 4096 May 3 2010 ..
drwxr-xr-x 0 me Administ 0 May 3 2010 CVS
Are there any workarounds you know of for tracking files with long paths using git on Windows?
I'm using 1.7.4.msysgit.0 on Windows Vista Business, SP1.
me@work
, is that your actual username or did you make that up? – Paintdir /x
will provide the short name. – Podophyllin