Search code examples
gitgit-cloneshallow-clone

Clone a git repo without history and have the original repo be able to push changes to the shallow repo


Here's the scenario. I have a repository A that has a TON of history and revisions that I don't want in this other repository, B. How can I sync the two without moving over the entire history.


Solution

  • The only solution I can come up with is to do an archive out of A, and then applying that onto the new repository, B. This would collapse all changes into one commit which isn't ideal but might be the only way to do this.