Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

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?)

like image 265
Ryan Avatar asked Oct 27 '12 13:10

Ryan


1 Answers

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.

like image 140
Kevin Reid Avatar answered Nov 03 '22 14:11

Kevin Reid