git拉错误 [英] git pull errors

查看:150
本文介绍了git拉错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图把一台Linux机器上的一个提交拉到一台Windows机器上。我得到这个错误消息:
$ b $ pre $ 错误:git checkout-index:无法创建文件my / folder / name /: (无效参数)

Linux 机器上,似乎有2个'name'文件夹名为:'name''Name'。即使在将它们联合在'name'并重新提交之后,我仍然会得到相同的错误消息。



在Windows上,我使用git 1.7.3.1.msysgit.0,而在Linux上我使用git 1.7.5.4版本。



我确实找到了一堆 貌似 相关的这样的问题,但没有一个有明确或相关的解决方案。



更新:这些文件托管在远程托管服务上,以便Windows和Linux计算机从远程回购站点获取。

解决方案

$ b回答我自己的问题。
$ b

第一步是@Don Branson,@VonC和@robinst建议。我在Windows机器上的一个新文件夹中执行了一个干净的 clone

这看起来不起作用,并且git返回了完全相同的错误。



然而, 显示有问题的文件夹为已删除,即使存在同名的文件夹并包含正确的文件。

然后我演示并提交了已删除文件夹,并将其推送到远程回购站。并从我原来的回购协议中提交。 分支已经正确更新。


I'm trying to pull a commit made on a Linux machine into a Windows machine. I'm getting this error message:

error: git checkout-index: unable to create file my/folder/name/: (Invalid argument)

On the Linux machine there appeared to be 2 such 'name' folders called: 'name' and 'Name'. Even after uniting them under 'name' and re-committing, I still get the same error message.

On Windows I have git version 1.7.3.1.msysgit.0 and on Linux I have git version 1.7.5.4.

I did find a bunch of seemingly related SO questions of this nature, but none had a clear or relevant solution.

UPDATE: The files are hosted on a remote hosting service so that both Windows and Linux machines pull from the remote repo.

解决方案

Answering my own question due to the weirdness of the solution.

The first step is as @Don Branson, @VonC and @robinst suggested. I did a clean clone into a new folder on my Windows machine.
This did not seem to work, and git returned the exact same error.

However git status showed the offending folder as "deleted", even though a folder with the same name did exist and contained the proper files.
I then staged and committed the "deleted" folder, pushed to the remote repo. and pulled the commit from my original repo. Lo-and-behold the branch was updated properly.

这篇关于git拉错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆