advapi
advapi

Reputation: 3907

Git-TFS does not initialize a parent branch in the middle

I've almost imported all the repos, but I've an issue with one of the most important I need to import.

git command time: [00:01:37.0192709] gc warning: Some Tfs branches could not have been initialized:

Please report this case to the git-tfs developers! (report here : https://github.com/git-tfs/git-tfs/issues/461 )

The /DEV inherits from a /Main and it has a lot of nested repos

The suspect I've is that this TFS folder

enter image description here

That starts with DEV and also I've a branch that's called DEV

enter image description here

And when on my local Git repo I try to do git branch DEV I got

fatal: cannot lock ref 'refs/heads/DEV': 'refs/heads/DEV/BUG_xxxx' exists; cannot create 'refs/heads/DEV

refs/heads/DEV/BUG_xxxx is the first one you see in the first picture

Any suggestion? I cannot rename actually the TFS folder or /DEV since it's used.

Upvotes: 1

Views: 121

Answers (1)

Philippe
Philippe

Reputation: 31227

Not sure you reproduced the exact git-tfs use case with your git command but it if git-tfs try to create a DEV local branch and you already have a DEV/something, yes, you can't: it's a git limitation because it is materialized by trying to create file DEV whereas a directory DEV already exists.

You could try to give a different local name using the command:

git tfs branch --init $/Repository/path/DEV DEV/DEV

Upvotes: 0

Related Questions