git-tfs / git-tfs

A Git/TFS bridge, similar to git-svn

Home Page:http://git-tfs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to clone all folders in branch

derricksmith opened this issue · comments

Forgive me, I have inherited a TFS server and am attempting to migrate to Github. I am somewhat familiar with Git but less so with TFS. I have followed guidance to Migrate TFS to a local GIT repository but the migration only seems to capture some of the folders in the branch.

I have a TeamCollection with several Projects. Each project had several root level folders with multiple subfolders. I converted the root level folders to branches. As an example, when I run:

git tfs clone http://{tfs server}:8080/tfs/TeamCollection "$/Research/Groups . --branches=all

git-tfs - source

The migration completes but the GIT repository does not contain all of the folders from TFS.

command

git-tfs - destination

Strange, not sure what is going on. Did you by any chance not check out the latest version in the git clone, e.g. seeing an older version which doesn't have all the folders?

You also cloned into an existing folder (by specifying the '.' in the commandline). Try to clone into a new directory, just in case it makes a difference (hopefully it shouldn't, but I personally never clone into an existing directory).

commented

@derricksmith I'm in a similar situation. We're going to be migrating away from our old TFS 2015 server into a git hosting service soon. Either Azure DevOps or GitHub, which we'll choose is TBD.

I'm wondering how things went for you, concerning this issue? I've got several TFVC repos with both inner TFVC repos and folders. One TFVC has a LOT of both inner TFVC and folders, all at the same level. It's sort of a kitchen sink repo where lots of people dumped many, unrelated projects into it. Your issue causes me concern. I'm wondering if I'll have several folders disappear while using git-tfs in those TFVC repos with folders? If so, I think it is possible to convert folders into TFVC repos, even in my old TFS 2015 instance. Would that fix the problem?

At the top of my head, I don't know what happens when you convert a folder after the fact to a TFS branch.
Maybe that is also the underlying problem of @derricksmith, as the original issue mentions

I converted the root level folders to branches.

git-tfs works well with when the branches are created in TFS (as Branches, not as folders) and then the work happens, e.g. files are commited etc.
All bets are of if you try to import an already populated folder with a lot of files and this folder was converted that to to branch!