0

I want to migrate repository from TFS to Git. I would like to setup the Git repository first (.gitattributes, LFS) and then start importing the TFS commits via git-tfs.

Unfortunately I haven't found the correct steps to do it. Is it even possible? The main goal is to avoid later filtering the whole imported repository (like git lfs migrate import).

When trying following:

git init
git lfs install
git lfs track *.bin
edit .gitattributes
export MSYS_NO_PATHCONV=1
git tfs init http://tfs:1234/tfs/defaultcollection $/repo/path
git tfs fetch

Two trees are created (there are two root commits), which is not desirable.

James Skemp
  • 8,018
  • 9
  • 64
  • 107
sharpener
  • 1,383
  • 11
  • 22

1 Answers1

0

You may want to append a git repository on top of another.

Then you can :

Set a graft, that does exactly that. If you are satisfied with the result you can do a filter-branch to make this permanently. Or you can use filter-branch right away with a --parent-filter.

Refer to this thread for details : How to append a git repository on top of another

More information about git filter-branch please see git-filter-branch - Rewrite branches

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55