I have an app that is live on Heroku/Github, but recently completely rebuilt it from scratch - I want to keep the old repository name, what is the best way to replace the li
cd old_version
git rm -rf .
git commit -m "Removing the old code"
git remote add version2 "/path/to/new_version/.git"
git pull version2 master
That should fully preserve both histories and have the new version be the HEAD of orginal repo. I would recommend backing up repos up before you try this.