1

Can anyone tell me if it is possible to push code from TFS to another GIT based host? The reason is this:

I'm using TFS 2012 (services, the online one -> [companyname].visualstudio.com) with a GIT repository. I have an AppHarbor account that would automatically publish my code on check in with CodePlex, GitHub Or BitBucket. Unfortunately, there is not support for TFS yet (hopefully it is coming soon...who knows though). Is there any way I can commit my code to TFS, and then have that push a copy to either of the providers above? (Most likely Codeplex, since it's TFS in the backend anyway).

SlackerCoder
  • 1,323
  • 5
  • 28
  • 53
  • I'm looking for exactly the same thing. I want to keep using Team Foundation Service, but want to open source the project too. I see two options, 1) TFS creates an "Open Source" project type... 2) When I check in to TFS a copy is then sent over to GitHub too. The accepted answer is talking about Visual Studio's Git Tools, I don't think it answers the question. – gregpakes Mar 04 '13 at 09:07
  • Yeah, I thought that solved my issue, but in the end it really didn't. I'm still looking for a potential solution. – SlackerCoder Mar 05 '13 at 02:55
  • I created this: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3701461-in-team-foundation-service-allow-projects-to-be- – gregpakes Mar 05 '13 at 12:23

2 Answers2

1

You can have an exact copy of your repositories in different git servers, you can use:

git push --mirror server

Sample

git push --mirror https://github.com/ghuser/repo.git

I mean from a git repository you can push in different servers and more than one at the same time, as GIT is a distributed repository.

More references:

https://help.github.com/articles/importing-an-external-git-repo

Is "git push --mirror" sufficient for backing up my repository?

Community
  • 1
  • 1
Marco Medrano
  • 2,530
  • 1
  • 21
  • 35
-1

From Brian Harry's Blog Post on the Git/TFS solution:

Does VS’s Git integration only work with our Git server?

Absolutely not! Both client and server are standard implementations of Git. Our client will work with pretty much any Git repository – local, enterprise, Codeplex, GitHub, BitBucket, …. And TFS will work with pretty much any Git client – existing Git command lines, XCode, Eclipse’s Git support, …. This was a core principle from day 1. This is not about lock in – it’s about providing a good and interoperable Git capability.

DaveShaw
  • 52,123
  • 16
  • 112
  • 141