We are using TFS as main source control and I would like to use git as a "frontend" together with git-tfs rcheckin command but I have problems importing my repositories into git.
I have a two projects in my TFS
$/ProjectA
$/ProjectB
and I would like to manage them in one git repository.
How I can clone those two into one git repository so I can commit and push changes to both projects as one TFS changeset?
I tried using git tfs subtree but somehow I cannot figure out workflow with this. My approach was to init git repo like shown below but I got errors I cannot recover from:
> git init
Initialized empty Git repository in c:/somedir/.git/
> git tfs subtree add --prefix=ProjectA http://tfs_server:8080/tfs/ $/ProjectA
executing subtree add
-> new owning remote default
-> new remote default_subtree/ProjectA
Fetching from TFS remote 'default_subtree/ProjectA'...
C3779 = 7e532464ef6120ac0b19aa3c7651ceae915dc366
C3780 = 16f4636fc53d729767f65213ed047c11d1a707ee
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
error running command: git subtree add --prefix=ProjectA "-m Add 'ProjectA/' from commit '16f4636fc53d729767f65213ed047c11d1a707ee'
git-tfs-id: [http://tfs_server:8080/tfs/];C3780" refs/remotes/tfs/default_subtree/ProjectA
Command exited with error code: 1