This project is read-only.

git-tf: checkout conflict with files

May 7, 2013 at 7:58 PM
So I am stuck, I am trying to get the latest files from TFS on my Mac and I am getting an error about a conflict.

I am running this command:

git tf pull --deep --force --ours

Thinking this will overwrite tell it to ignore the server version. But that doesn't seem to work. I also try --theirs and it gives the same error.

How the heck do I tell this thing to PULL the latest version and merge this file that apparently conflicts.

Thank you
May 7, 2013 at 8:18 PM

I'm sorry to hear you have issues with Git-TF. What version of Git-TF do you have, and what error message do you get? Also, could you send us Git-TF log files reflecting the issue? You could found them as
~/Library/Application Support/Microsoft/Team Foundation/4.0/Logs/git-tf-*.log
Just to unblock you for a moment: could you try and clone the latest version from TFS to a fresh new empty directory? After that you might fetch the cloned branch into a new branch in your working Git repository and merge the branches using Git.

I do understand that it's extremely inconvenient, but just to unblock might work out...

May 8, 2013 at 4:51 PM
Edited May 8, 2013 at 4:57 PM

One more question: why do you use --force and --ours parameters in your pull command? What exactly would you like to achieve? The --force parameter is used by Git-TF and means that it should download again the latest change set downloaded previous time. The --ours parameter is just passed to JGit and means that you wish to take the entire your tree without looking onto individual files. The latest action could cause big troubles, because GitTF keeps a map between commits in the master branch and change sets downloaded from/uploaded to TFS. If you change your master branch's history dramatically, that could cause serious and unpredictable issues.

When using Git-TF, we strongly recommend to keep a linear history in the master branch of your local repository that you use to exchange data between Git and TFS. If you don't do that, because of deep difference between TFS and Git ideologies, its highly possible that Git-TF won't be able to map Git's commits to TFS's change sets and vice versa. So, usually Git_TF users develop their code in other branches (even repositories sometimes) and always use --rebase option when pulling from TFS or merging their changes into the master branch.

Jul 10, 2013 at 2:32 PM
What happened with this? This happens to me too whenever someone changes the same file that I'm working on.

someone changes file A and checks in the file;
I modify file A locally in Xcode;
I do "git tf pull";
gives me "git-tf: Checkout conflicts with files: A" error. It didn't pull anything (even the files that I didn't change locally), and I can't do anything from there. There seems to be no way I can edit or merge or resolve conflicts or anything (even with --resolve, --theirs, etc)
Jul 15, 2013 at 4:30 PM

Hi droda59,

Did you try “git tf pull –rebase” command?