The short story is that this is not a good structure. A branch is not a
good abstraction for keeping a certain part of the code separate from
another. You're better off keeping the private code in a separate
repository, and then integrate them at build- or runtime.
We've discussed a similar issue recently
On Monday, July 2, 2012 9:44:23 PM UTC+2, Japie wrote:
> I have two branches in my project, A and B. A is the master branch and B
> is from A but includes code which should never be public.
> When I write code that needs to go to both branches I create a new
> branch from A, do the feature code, and then merge back into A and into B.
> But some files from branch B, especially the build config files, which
> includes extra directories, get changed back into the versions as in branch
> A. What would the correct workflow for such a setup be?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at