Reputation: 19248
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?
Upvotes: 2
Views: 1086
Reputation: 1327384
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.
The OP adds in the comments:
A more specific answer to my question - of putting a specific branch to a TFS server - I guess would be to use
git push --set-upstream private-repo private-branch
, which is what I'm doing now.
Upvotes: 3