The goal is to keep the old code in case it is needed while directing people visiting the old domain access to the newly written site. This can be accomplished with carefully sequenced site name changes. Heroku describes how to change site names here. You will also have to update git remotes and such on your local machine but the Heroku instructions tell you how to do that, too.
The now somewhat obvious sequence is:
- change name of [old site] to something like [old_site]-backup
- change name of [new site] to [old site]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…