Eugene Beresovsky Eugene Beresovsky -4 years ago 81
Git Question

Can I maintain a (non-public) branch of a public github repo in a local TFS server?

I created a branch of a public github repo that I use locally to make changes I do not want to publish back to github. Now I'd like to make that branch available internally to other developers (and at the same time have it backed up properly rather than relying on my dev box's disk).

As we run a TFS server (which also has a git interface), I wonder if I can just maintain my private branch on our TFS server. Is that possible?

Answer Source

You simply can declare another Git repo, which would be associated to a different team (the "other developers") in a TFS second project.

Your current repo can then be pushed (with all its branches, including the private one)

cd /path/to/current/repo
git remote add private /tfs/url/of/second/repos
git push --mirror private 

Your repo would then have two remote: the origin one (GitHub) and the private one TFS where you can push your private branch and collaborate with the other developers.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download