-2

I will try to explain the scenario...

Repository A is public (github). I created a Repository B (bitbucket), which is private.

Repo B is empty. I want to get all stuff from Repo A to Repo B at first.

Then I will start to work on Repo B, making pull/fetch on Repo B only.

But from time to time I want to fetch from Repo A in case there are new stuff.

How is that possible? I did read git documentation about duplicating a repository but I just don't get it.

Thanks

1 Answers1

2

This sounds like a variation on the Integration-Manager Workflow. There's a very good question and answer about how to do this all on GitHub already that might be enlightening as well.

The Integration-Manager Workflow from the Pro Git book by Scott Chacon and Ben Straub

Your repository A (GitHub) is the blessed repository in this picture. Your repository B (Bitbucket) is one of the developer public repositories in this picture. The local repository on your computer is one of the developer private repositories in this picture.

In your day-to-day workflow you'd push to and pull from repository B against your local repository. Occasionally, you'd pull/fetch from repository A, decide how to integrate the new commits into your local repository and then push the new commits from your local repository to your repository B.

When you're ready to contribute back to the original project—if ever, you'd make repository B public and then send a request to the project maintainer with the details of what you propose to have merged in.

Community
  • 1
  • 1
chwarr
  • 6,777
  • 1
  • 30
  • 57