我想使用git来更有效地管理使用CVS作为其源代码管理的项目的工作,但是我遇到了问题add
-ing一个确实有很长路径的文件--276字符。msys git和长路径
不幸的是,这个文件是由自定义IDE生成的,我正在使用的工具随附在工具中,因此无法重命名或移动。
使用以下,力图使这个半可读:
<projectpath>
- 路径保存所有的组件为这个项目
<hugepath>
- 从<projectpath>
到我在与
问题的第一个文件的路径<filename>
- 我有问题的文件与
[email protected] <projectpath>
$ git init
Initialized empty Git repository in <projectpath>/.git/
[email protected] <projectpath> (master)
$ git add <hugepath>/<filename>
fatal: unable to stat '<hugepath>/<filename>': No such file or directory
[email protected] <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
的MSYS工具使用路径UNC前缀通常可以让你的工作活像名ķ 在Windows文件长,但是这似乎并没有得到解决的路径限制:
[email protected] <projectpath> (master)
$ git add //?/<projectpath>/<hugepath>/<filepath>
fatal: Too long path: //?/<projectpath>/<hugep (intin - the path displayed is trimmed)
[email protected] <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
是否有你所知道的任何变通办法来跟踪文件与在Windows上使用Git的长路径?
我在Windows Vista Business SP1上使用1.7.4.msysgit.0。
我喜欢`我@工作',是你的真实用户名还是你做的? – trysis 2014-03-07 04:15:11
问题已在msysgit 1.9中修复。 看到我的答案“git pull中止错误文件名太长”http://stackoverflow.com/a/22831095/151641 – mloskot 2014-04-03 07:52:37