2011-12-04 87 views
1

我在Heroku上安装了一个应用程序名称的应用程序,但喜欢使用我不打算使用的代码库。我重命名了我不想要的项目的应用程序。然后,我用我正在处理的新应用程序推送给Cedar,并使用我停止工作的原始应用程序名称明确声明了我想要的项目名称。现在,当我去那个应用程序的名字,我只看到旧的应用程序,即使我推动了新的。我正在做什么来获得我正在使用我喜欢的应用程序名称的新应用程序?在Heroku上用新应用程序覆盖应用程序

我假设我必须手动删除Heroku上的所有内容,然后再做一次“git push heroku master”,一切都会好起来的,但由于我对这一切仍然陌生,所以我想知道正确的程序是。

谢谢。

Here is what I mean: 
http://AppNameILike.heroku.com 
#rename it to: 
http://AppNameIlike-OLD.heroku.com 
#create new heroku app with new project (notice recycling the name I like): 
http://AppNameILike.heroku.com 
#This new app still shows my old app 
+0

你是否将git remote改为heroku以指向新的名称/应用程序? – andreiursan

+0

不确定。我该怎么做呢?当我创建新的应用程序,我做了:“heroku创建 - 堆雪松”,然后“git push heroku主”,然后“heroku重命名AppNameILike” – AdamT

+0

如果你去应用程序目录并使用以下命令: > git remote show Heroku的。比你能看到取和推URL是类似[email protected]:new_name.git? – andreiursan

回答

2

您是否使用过heroku重命名命令?

http://devcenter.heroku.com/articles/renaming-apps

$ heroku rename newname 
http://newname.heroku.com/ | [email protected]:newname.git 
Git remote heroku updated 

在改变一个heroku上应用的子域,可以更改的git推URL(即heroku上的git远程)。因此,您还需要使用heroku重命名命令来拥有与heroku正确的git“连接”。

+0

是的,我确实使用“heroku重命名AppNameILike”,这就是我现在的位置。 – AdamT

+2

重命名过程正确,但有时远程heroku回购没有正确更新,因为它认为它不是最新的。你必须在本地推送一个不同的分支,然后你可以切换回主(或者你的默认回购)。请参阅:http://stackoverflow.com/questions/6104258/how-to-reset-heroku-app-and-re-commit-everything – databyte

+0

@databyte是的,谢谢。 – AdamT