• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 790
  • Last Modified:

Git: How to push a branch to a different remote

Hi, experts,

I have an open source project, and I want to have my closed branch within this project. I can push it to a different remote, for example, I can have my open source branches on github, and my closed branches on bitbucket. Would that work? Is there a better way, perhaps with forking?

Thank you,
Mark

PS. Both projects are mine, I just don't want to open source some part of it.
0
kerzner
Asked:
kerzner
1 Solution
 
kerznerAuthor Commented:
Well, you can do this with forks, and perhaps that is what I should do.
0
 
johanntagleCommented:
Both can work.  For the additional repo, the following should do:

git remote add -t branch_name name_for_other_repo other_repo_url
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now