gittfsgit-tftfvc

Import using GIT-TF - item already has pending changes


I have two instances of TFS, one 2012 and the other 2013. My goal is to export some source code from the 2012 instance and import it into the 2013 instance, preserving the check in history.

The method I'm employing is;

  1. Install GIT for windows from http://msysgit.github.io
  2. Install git-tf from http://gittf.codeplex.com
  3. Create a local folder for my git repository c:\git
  4. Open a GIT Bash prompt in that folder (so it is current)
  5. $ git tf clone http://old-tfs-host:8080/DefaultCollection $/myProject/myBranch --deep
  6. Delete tf folder and git-tf file
  7. Copy in my USERMAP file
  8. $ git tf configure --deep --keep-author --force http://new-tfs-host:8080/DefaultCollection $/myProject/myBranch
  9. $ git tf pull
  10. $ git commit -a -m "Initial import from TFS 2012"
  11. $ git tf checkin --deep

I get an error after processing about 57%

git-tf: failed to pend changes to TFS due to the following errors. Please fix the errors and retry check in. The item $/path-to-file already has pending changes.

Question - how do I resolve pending changes for the file? No one else is in the repository while I am doing this check-in so it would seem that the export may be corrupted?

I have used this same method for two other branches and have been successful.


EDIT I found that the issue is a file was renamed with the only difference being case. So in the same change I have

  1. delete $/source-file
  2. edit $/project-file
  3. add $/Source-File

Obviously I am renaming them, but the file deleted in line 1 is the same as the file in line 3 with the only difference being file name case.

So I have tried $ git config --global core.ignorecase false but that does not resolve the issue of both deleting and adding the same file in the same change.


Solution

  • I had the same problem, which occurs when you delete, add and edit the same file in one changeset.

    if you do git tf checkin --preview you will see the details.

    I solved it by doing:

    git tf checkin --deep --renamemode=none