I have two git repos closed
and open
. I created cloned open
from closed
and squashed all commits into one:
$ git rev-list --max-parents=0 --abbrev-commit HEAD
ffa625c
$ git reset --hard ffa625c
$ git merge --squash HEAD@{1}
$ git commit
$ git reset --soft "HEAD^"
$ git commit --amend
$ git gc --aggressive
open
is a public GitHub repo, closed
is a private GitHub repo. Now I develop something in closed
(with all its git history). When I merge the new feature into open
I also get all history from closed
.
How can merge without polluting open
with the history of closed
?
Background: I have a git repo closed
with closed source code (containing closed source libraries). Now I got rid of all closed source libraries and I would like to open source my code but I want also to have the closed source repo with all its history to make some closed source additions later on which will be merged to the public repository at some point.