0

I've got a git repository that was migrated from a TFS repository. There is currently no link between the repositories.

If I use git tfs list-remote-branches {http://...TFSRepo}, I can see the branches in TFS.

What I want to do is be able to pull a TFS changeset into my current git repository -- preferably as a commit, but I'd take just pulling the changes into the current branch.

quick-clone doesn't do what I need as it creates a new git repository (buried in my existing git repository...)

Is is possible to perform a pull of a single TFS changeset using the git-tfs extensions?

scott-pascoe
  • 1,463
  • 1
  • 13
  • 31

1 Answers1

0

There is no way to pull only one changeset in an existing git repository that is not a git-tfs repository.

But you've got 2 possibilities to achieve your goal...

  • The first is to do a quick-clone in a new repository and then add this repository has a remote and fetch the commit you want.

  • The second is more tricky, less sure to work because you must understand how git-tfs works.

Amend the last commit to add at the end of the commit message something like that:

git-tfs-id: [https://tfs.codeplex.com:443/tfs/TFS16]$/valtechgittfs/BugMerge;C31467

with :

git-tfs-id: [https://url.tfs.server:/tfs/TeamCollection]$/ProjectName/BranchName;CchangesetId

where you specify as the changeset id, the one of the last changeset before the one you want to fetch. Then, if you have at least the v0.20 of git-tfs, then, fetch changesets...

Philippe
  • 28,207
  • 6
  • 54
  • 78