git tfs clone with partial history
Asked Answered
B

1

5

I'm trying to migrate a TFS repository to git, but I've run into an issue.

Looking at the history of this particular repository in TFS, it looks as though the parent was copied into a new TFS repository and then at a later time the parent was baseless-merged into it (or something similar).

When I run the "git tfs clone" command I get the error:

git-tfs was unable to find the root changeset (ie the last common commit) between the branch '$/x' and its parent branch '$/y'...

Is it possible to limit the history with git tfs clone? I know I can use quick-clone, but that only gives me the last commit. Ideally I'd like to go back to a particular change set, or exclude the baseless merged changeset that doesn't have a common parent...

Cheers!

Borchert answered 24/3, 2015 at 0:34 Comment(0)
R
8

If you want to clone from changeset 12345 and onwards, you can first use quick-clone with the flag -c12345 or --changeset=12345. Then you can use git tfs fetch or git tfs pull to get the remaining history from that point on.

Readus answered 25/3, 2015 at 8:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.