0

I'm wondering whether I can use GIT-TFS as a tool to migrate git repository to TFSVC.

I've tried using GIT TF and it works using checkin --deep. (not working with branches though)

Is this somehow possible using GIT-TFS?

Steps:

  1. git svn to create a local git repository from remote svn.
  2. git tfs init http://tfs-repository
  3. git tfs rchekin <- ERROR: No TFS parents found.

Any help?

mileski
  • 158
  • 2
  • 11

2 Answers2

1

(Disclamer : I'm one of the main developers of git-tfs...)

I've tried using GIT TF and it works using checkin --deep. (not working with branches though)

Is this somehow possible using GIT-TFS?

Perhaps, if you know perfectly well how git-tfs works, you could end up with what you ask for (because git-tfs support branches). But it won't be an automatic process, you will have to do a LOT of things manually (with hours and hours of hard work to do!). I highly recommend against trying to do that. The way Git works and TFS works made it very difficult to migrate from Git to TFSVC...

Git-tfs was created to use git locally when you are obliged to use TFS as source control or to migrate sources away of TFSVC because that's not a good Version Control System.

Don't try to use it to be locked using TFSVC :(

I think that you should better either migrate your sources inside a Git project in TFS if you have TFS2013 or use Git as central repository.

Community
  • 1
  • 1
Philippe
  • 28,207
  • 6
  • 54
  • 78
  • thank you for your answer. I thought it was straightforward as with git tf. It's obvious that it is not, and I can't invest anymore time in this. The problem with our repository was exactly brancing and proper setting of the branches, but we have to manage it with git tf somehow. As for using TFSVC, it's not quite so simple to change to another repo. The biggest problem for us is the gated check in, which is at the moment not supported with git (there are possibilities to solve the problem with a little bit of reorganization and some automated scripting, but not worth the time). – mileski Oct 08 '14 at 21:55
  • 1
    You can easily make something similar to gated check in with a simple [script like this](https://github.com/pmiossec/git-build). And IMHO, pull request workflow (with building pull request) is a better workflow that gated check in... – Philippe Oct 08 '14 at 23:19
-1

You can try those steps :

git-tf clone <TFSSERVERURL_SOURCE> $/<TFSBRANCPATH> oldserver --deep
-- run Git CMD
git init newserver
cd newserver
git pull ..\oldserver --depth=100000000
git-tf configure <TFAURL_DESTINANTION> $/<TFSBRANCPATH>
git-tf checkin --deep --autosquash
Vega
  • 27,856
  • 27
  • 95
  • 103