Say I have:
X Z
o-----o----o-----o---o A
\ / \ /
o------o---------o B
Y
Suppose that A and B intentionally diverge, because (say) A is a public branch and B is a company-internal branch (which needs to have some differences for technical reasons and potentially has secrets that should not be in the open-source release). Suppose X is a commit that intentionally does not pick up some of the changes in Y.
What is the best way to accomplish the following with Git?
- Changes from Y that were intentionally omitted from the merge at X are not re-applied at Z.
- I can publish a public version of A where the merge at X appears as a single squashed commit, so that none of the potentially secret information in Y (or other internal commits) shows up in the public revision history.