简体   繁体   中英

Git Storage with Private & Public branch

I want to set up a repository (either bitbucket / github / ... ) where I can have a private Git repo for developers but also a public access to releases. Which service provides that?
On Sourceforge everything is public, seems in Bitbucket everying is either all private or all public.

Which service do you recommend?

I'm not sure what is your goal, but it doesn't make much sense. Once you merge your private branch into public every single commit in the private branch up to the new tip will inevitably become public. If you just wan't to maintain privacy before you release, you can have the "everything either all private or all public" and only push your private branch to that repository.

Github provides public repos for free and private ones for a reasonable cost. You can determine when you create the repo whether it's public or private.

There is no limit to the public repos on an account, but private ones cost an increasing amount as you add them.

You could set up two different remote repos if you do not want to pay anything for a private repo in github.

The private one on a personal server with gitlab or gitolite and the public one on github / bitbucket.

The release branch will have the github / bitbucket as remote repo:

git remote add release github:user/repo

The development branch with private acces:

git remote add develop server:/path/to/repo

To push to a specific remote branch just type

git push release / develop

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM