Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"The item already exists" when adding trying to add files to TFS

I am having problems adding files to TFS Online. Here are the steps I made to get up to this point:

  1. Created a project in TFS "SomeProject_Classic"
  2. Mapped it to a path in my computer C:\SomeProject\classic
  3. Pushed all files from from WITHIN the \classic folder to this project
  4. Deleted the project in TFS
  5. Recreated a new project in TFS with the same name ("SomeProject_Classic")
  6. Mapped it to a path on my computer C:\SomeProject
  7. I try to add the classic folder (not only the files in it like step 3, but the entire folder itself)

On this last step, it gives me the error "The item $/SomeProject_Classic/classic/somefile.txt already exists".

Basically, I think it is having a problem thinking that I have already added these files because I created a project with the same name in TFS and never "checked those files out for deletion" before deleting the project.. I feel like I need to clear a cache or TFS memory or something. Any advice?

like image 453
AlbatrossCafe Avatar asked Oct 26 '15 21:10

AlbatrossCafe


3 Answers

Clean the Cache folder on client computer. The folder path is: C:\Users\username\AppData\Local\Microsoft\Team Foundation\6.0\Cache.

Use the tf destroy command to destroy, or permanently delete, version-controlled files from Team Foundation version control. Check:https://msdn.microsoft.com/en-us/library/bb386005(v=vs.100).aspx

like image 118
Cece Dong - MSFT Avatar answered Oct 14 '22 10:10

Cece Dong - MSFT


This was somewhat related to Cece's answer in that even though it was deleted on the server, my local computer still thought the file were in the uploaded workspace.

What I did was create a temp folder TempRepo on my desktop and moved the files from the "classic" folder to it. I mapped my workspace to this TempRepo folder. Then I was able to "add existing files" to the workspace and push my files from this temp folder to Visual Studio Online.

When I was done, I just mapped the workspace back to the original folder and performed a "Get" operation. Now I have all the files uploaded onto TFS and the correct workspace set.

like image 41
AlbatrossCafe Avatar answered Oct 14 '22 11:10

AlbatrossCafe


I just changed the file name. Fixed it.

like image 39
Cowboy Avatar answered Oct 14 '22 09:10

Cowboy