This project is read-only.

The item $/... already exists.

Nov 27, 2012 at 4:25 PM
Edited Nov 27, 2012 at 4:38 PM

I got this error a few times now. It happens when I do git tf checkin (depth set to 2147483647).

Unfortunately I cannot find the exact steps to reproduce, but this thing shows up after I upgrade packages.
In my case:
* pull latest changes from tfs
* do some work on a local machine (upgrade packages)
* rebase/squash some commits
* git tf checkin

The mentioned path does not exist on the server. In order to get past this error I had to revert back to previous (nuget) package versions, checkin, update packages and check in again.

Can anyone shed some light on this?

Nov 28, 2012 at 3:01 PM

Can you please share any errors in the git-tf logs found here "%LOCALAPPDATA%\Microsoft\Team Foundation\4.0\Logs"

Nov 30, 2012 at 3:19 PM

Sure. Here you go:

2012-11-30 16:17:55,932 ERROR [main] (git-tf) Error executing task CheckinHeadCommitTask
java.lang.Exception: failed to pend changes to TFS due to the following errors. Please fix the errors and retry check in.
The item $/<project pathhere>/packages/DotNetOpenAuth.AspNet. already exists.
The item $/<project pathhere>/packages/DotNetOpenAuth.Core. already exists.
The item $/<project path here>/packages/DotNetOpenAuth.OpenId.Core. already exists.

Nov 30, 2012 at 3:25 PM

This looks like a bug to me in the rename logic we have in git-tf. Can you try checking in using this command

git tf checkin --renamemode=justFiles

and let me know if that does not work ?

Nov 30, 2012 at 3:47 PM

Sure. I'll keep you posted.
Thanks for the quick response ;)

Nov 30, 2012 at 3:58 PM

using --renamemode=justFIles worked.

Nov 30, 2012 at 4:01 PM

The problem was probably that you were checking in a complex (or maybe simple) case of multiple file / folder renames. We have some heuristics to calculate the folder renames that has happened (since git does not track folder renames) but this heuristic probably has a bug that I will try to repro and fix.



Nov 30, 2012 at 4:18 PM

Well, sounds just about right. The operation that caused this was 'just' a nuget package update. So the simplest way to reproduce this would be:

  • create a new project (in my case mvc basic template - it includes some packages that are out of date)
  • git commit, git tf checkin
  • update-package
  • git commit, git tf checkin

I haven't verified that this will actually cause the error, but that's pretty much the workflow. When a package is update it changes the dir name just 'slightly' so from what you wrote, git is likely to treat this as a rename.

Hope this helps and thanks again for the tip.

Dec 6, 2012 at 10:05 PM

Hi there,

I had the same problem after a major refactoring session - "git tf checkin --renamemode=justFiles" did the trick