From: Łukasz Lew Date: Sun, 14 Dec 2008 15:38:35 GMT Subject: Re: How to maintain private/secret/confidential branch. Message-ID: In-Reply-To: <20081214145518.GA26380@mail.local.tull.net> Thanks Nick, thats really helpful (and surprisingly simple). I have a couple more questions: On Sun, Dec 14, 2008 at 15:55, Nick Andrew wrote: > On Sun, Dec 14, 2008 at 02:49:50PM +0100, Łukasz Lew wrote: >> I don't know how to make such a scenario work: >> - two repositories: pub, priv >> - priv is clone/branch of pub >> - there is some constant developement both in pub and priv >> - there are regular syncs with pub in priv >> >> Problem: >> Occasionally I want to push some changes from priv to pub. >> Then after syncing with pub I want to get as few conflicts as possible. >> >> Is it possible to do with git? > > Git can do almost anything. One should instead ask "How to do this > with git?" :-) So I've heard, but not yet experienced it myself. I'm thrilled to try. > > If I understand your problem, you could solve it with git cherry-pick > and rebase. On priv, make a for-public branch from a pub branch. Then > cherry-pick the commits you want from your private branch into the > for-public branch. That almost works. Can I somehow split existing commits just like in git-add -p? > Push your for-public branch to pub, > then rebase your private branch. Rebase to the tip of master? Is it needed? Ie. cherry-pick does not remove the patch from the master in priv. If I now pull from pub, I will get the same change and it mereges nicely :D Can I get away without creating for_pub branch? maybe cherry pick in pub from priv somehow? > > Nick. >