We have a Git repo with 7 contributing developers with over 2.5 years of history and about 10,000 commits. We use Assembla to push and pull from. When we add new developers
The best step-by-step instructions can be found on the Git SCM historical blog post "Replace Kicker" or in the Git book's chapter on "Replace".
The short summary is this:
git branch history
hash.git commit-tree
.history
commits onto your new base.master
branch up to the server.git replace
to re-connect the history together.The original post explains it much better with pictures.
When dealing with complex histories involving merges, this may not work well, depending on how well git rebase --onto
works with --preserve-merges
. You should obviously test well before proceeding.