1

I'm busy experimenting with git-tfs do tfs to git conversion. I understand the cmd below will clone everything and convert TFS branches into the git repository:

git-tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1/Trunk --with-branches

There are a number of branches I don't want moved over - is there a way I can exclude one or more specific branches?

thanks

Avner
  • 4,286
  • 2
  • 35
  • 42

1 Answers1

1

You won't be able to exclude any branches during the clone operation. It's an all or nothing operation.

Remember that branches in git (pointers to commits) are different to branches in TFVC (folders) so if you're not planning on pushing back changes to the TFVC repository afterwards then you can simply delete the branches you don't want by using git branch -D operation on each of the branches you wish to exclude.

After the clone don't forget to do a git gc and a git tfs cleanup to minimise the size of your git repository.

Richard Banks
  • 12,456
  • 3
  • 46
  • 62