문제

I have a private repository on my own server hosted with gitolite. Now I want to opensource it on github, but still have one private branch.

All howtos are implying that I want to mirror whole repo with all tags and branches. But is it possible to have only common branch?

So, all I want is to keep my private branch up-to-date with public, but with some specific changes (these changes are even in separate catalog).

도움이 되었습니까?

해결책

You could configure your local repository to push to both remotes.

git remote set-url --add --push origin git://github/repo.git
git remote set-url --add --push origin git://gitolite/repo.git

Then you could push the public branch to origin.

You could maintain your private branch separately, and push that to the gitolite remote.

git remote set-url gitolite git://gitolite/repo.git

You are free to merge or cherry pick differences between the branches.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top