git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Private/public branches/repos workflow

From
JMJerome Martin <tramjoe.merin@gmail.com>
Date
May 5, 2011, 15:16 UTC
Message-ID
<BANLkTi=TLeePH0JDvnE0XPiCzXFxid9BWQ@mail.gmail.com>
Hello list,

I have an application that lives in a git tree. That application is a commercial product, but we have decided to dual-licence it and release an open-source version of it, along with all further commits to it. Preparatory work for this has been done, and I now have two (let's ignore the other) branches in my git tree, 'public' and 'private'.

The problem is, I cannot simply push the public branch on a public repository, because the history contains a lot of stuff that are not to be publicly released.

I thought I could squash all commits on that 'public' branch for the initial public release and resume working from there, keeping the ability to happily merge subsequent commits between 'public' and 'private', but this does not work: I am always left with the initial commit of my whole tree (which unfortunately is not releasable) and the big sqashed commit.

So what we did for now is to create a new git tree completely from scratch, containing only the public code tree. However, I am afraid this will lead to a nightmarish workflow, as it involves me working on our internal tree 'public'/'private' branches, and from there, replicate the commits to my internal 'public' branch to that published repository. As pushing/pulling there results in having all the history committed back to the published repo, I must resort to either having to cherry pick all those commits one by one, or manually apply them to the published repo. Maintenance hell.

Is there any recommended workflow to achieve the result I am looking for ? How are other people doing it ?

Best Regards,
-- 
Jérôme Martin
Next: Seth Robertson
Message 1 of 8 in “Private/public branches/repos workflow”
  1. Jerome MartinMay 5, 2011
  2. Seth RobertsonMay 5, 2011
  3. Jerome MartinMay 5, 2011
  4. Junio C HamanoMay 5, 2011
  5. Jerome MartinMay 5, 2011
  6. Junio C HamanoMay 6, 2011
  7. Jerome MartinMay 6, 2011
  8. Jerome MartinMay 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.