I would be remiss if I were to not mention that git-tf was not meant to be a replacement for a proper migration and integration tool.
That said, if you want to try, you cannot simply git tf clone
a repository and then git tf checkin
to a different server. git-tf
maps commits to changesets to ensure consistency in the git and TFS repositories. Thus when you change the remote, it goes looking for those changesets in the new server.
If you really want to push this to the new server, you'll need to remove the changeset to commit map.
The easiest and most robust way to do this - without messing with the configuration data - is to simply clone the git repository and set the cloned repository up with the new server. Then you can git tf checkin
to it:
$ git clone ~/path/to/repo ~/path/to/cloned_repo
Cloning into cloned_repo...
done.
$ cd ~/path/to/cloned_repo
$ git-tf configure https://youraccount.visualstudio.com/DefaultCollection $/YourProject
Configuring repository
$ git-tf checkin
Connecting to TFS...
Checking in to $/YourProject: 100%, done.
Since git-tf
maps only a single TFS repository, this also allows you to do incremental moves. If, after the initial migration, there are new changesets you want to migrate, you can pull them to the cloned git repository, then push them to the new TFS server without re-reconfiguring.
$ cd ~/path/to/cloned_repo
$ git pull ~/path/to/repo
$ git-tf checkin
Connecting to TFS...
Checking in to $/YourProject: 100%, done.
.git/git-tf
folder can do the same effect – Babism