无法使用 git 提交我的项目
我正在使用 git 的 eclipse 插件来提交我的 PHP 项目。 到目前为止一切都很顺利,但是当我提交时突然出现以下错误:
提交失败
发生内部错误
路径找不到条目://ms_system/.../file.php
我注意到提交列表中的某些文件具有无效路径,而不是:
dcms_system/.../file.php
我得到:
//ms_system/.../file.php
这显然是错误的。
我该如何修复它?
I'm using the eclipse plugin for git in order to commit my PHP projects.
Until now everything goes fine but suddenly when I commit i get the following error:
Committing failed
An internal error occurred
Entry not found by path: //ms_system/.../file.php
I notice that some of the files in the commit list has an invalid path, instead of:
dcms_system/.../file.php
I get:
//ms_system/.../file.php
Which is obviously wrong.
How can I to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我有类似的问题。我收到同样的错误,因为我试图提交未添加的文件。为了解决我的问题,我必须在提交之前“添加到索引”。
I had a similar problem. I was receiving the same error because I was trying to commit files which were not added. To resolve my issue I had to "Add To Index" prior to commit.
我遇到了同样的问题,只需对项目进行刷新(F5)即可解决。
I had the same problem, it was solved by simply doing a refresh (F5) on the project.
对我来说,以上答案都不起作用。经过实验,我发现冲突的文件路径被列为未跟踪的文件,您可以在提交页面中选择忽略它们。
即进入Eclipse中的repo视图->右键单击存储库 ->提交->显示未跟踪的文件(默认选择)->查看路径错误的文件并将其从提交中排除
For me, none of the above answers worked. After experimenting, I found out that the conflicted file paths are listed as untracked files that you can choose to ignore in the commit page.
That is, go to the repo view in Eclipse -> right click on the repo -> commit -> show untracked files (selected by default) -> view files with erroneous paths and exclude them from the commit
我创建这个作为我未来的自我的参考
以上答案都不适合我。
这是SO(甚至谷歌)上与此相关的唯一问题。
我认为有效的是:
PS:
这可能没有做任何事情,只是记录它
PPS:
如果上述方法不起作用:
I'm creating this as a reference for my own future self
None of the above answers worked for me.
This is the only Q on SO (or even google) pertaining to this.
What did work, I think, was:
PS:
This might not have done anything but just documenting it
PPS:
If the above does not work:
我设法解决这个问题:
不是推荐的解决方案,但它现在正在工作。
I manage to solve this problem:
Not a recommend solution but it`s working now.