Ryan
Ryan

Reputation: 4279

Working with two repositories, one with a "scrubbed" history

So I've got a private codebase that I am co-developing with some external collaborators. I want them to be able to contribute to the code, but I don't want them to have the entire commit history of our project to peruse. I know it's possible to "squash" the history of our repository using rebase: This is ideal, to just condense our entire history as if it had been one commit. Is it at all possible then, to have two repositories, one with a 'squashed' history that our collaborators can use, and a second repository that contains our history that we can use internally, and actively push and pull between them? (without betraying history of the more detailed repository to the simpler one?)

Upvotes: 6

Views: 79

Answers (1)

Kevin Reid
Kevin Reid

Reputation: 43782

You cannot push or pull between two different histories. However, you can keep two histories (even in the same repository as separate branches), if you want. You will have to use git rebase and/or git cherry-pick to transplant new commits from one history to another.

Upvotes: 1

Related Questions