Moshe Simantov
Moshe Simantov

Reputation: 4503

Can't commit my project with git

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?

Upvotes: 3

Views: 4506

Answers (5)

Srikanth
Srikanth

Reputation: 2114

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

enter image description here

Upvotes: 0

Dheeraj Bhaskar
Dheeraj Bhaskar

Reputation: 19049

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:

Goto Git Repo View in eclipse -> rt click on your repo -> collect garbage

then commit

PS:
This might not have done anything but just documenting it

I also was on the git shell (github shell) at the same time running git status commands (that's all I ran) on the root of the repo. And surprisingly found that there were no Staged/Unstaged changes, eventually realizing that the problem was solved.

PPS:
If the above does not work:

Goto Git Repo View in eclipse -> rt click on your repo -> collect garbage -> rt click on your repo -> clean, then commit

Upvotes: 6

Zenrique Steckelberg
Zenrique Steckelberg

Reputation: 21

I had the same problem, it was solved by simply doing a refresh (F5) on the project.

Upvotes: 1

Jeremy Kie
Jeremy Kie

Reputation: 709

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.

Upvotes: 3

Moshe Simantov
Moshe Simantov

Reputation: 4503

I manage to solve this problem:

  1. I change the problematic folder name to something else
  2. Commit
  3. Change the problematic folder name to the old one
  4. commit

Not a recommend solution but it`s working now.

Upvotes: 4

Related Questions