如何在本地 git 文件夹中删除对旧 Heroku 应用程序的引用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24071375/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How Do I Remove references to an old Heroku app in local git folder?
提问by djpATLSF
I deleted a heroku app reinitialized the local repository but when I try to add the new remote repository it won't let me add the new remote because the remote already exists but with the old name. I tried doing a rename but that didn't work either because of course the old app no longer exists. When I run "git remote -v" I get:
我删除了一个重新初始化本地存储库的 heroku 应用程序,但是当我尝试添加新的远程存储库时,它不会让我添加新的远程存储库,因为该远程存储库已经存在但使用了旧名称。我尝试进行重命名,但这也不起作用,因为旧的应用程序当然不再存在。当我运行“git remote -v”时,我得到:
heroku [email protected]:fierce-reef-7370.git (fetch)
heroku [email protected]:fierce-reef-7370.git (push)
both are referencing the old app. I have no idea how to remove these so that I can push to the new remote heroku app.
两者都在引用旧应用程序。我不知道如何删除这些以便我可以推送到新的远程 heroku 应用程序。
Thanks.
谢谢。
回答by Ismail Badawi
You can use git remote set-url
to change the url:
您可以使用git remote set-url
更改网址:
git remote set-url heroku <new-url>
Alternatively, you can use git remote rm
to remove a remote by name:
或者,您可以使用git remote rm
按名称删除远程:
git remote rm heroku
回答by Kartik Chauhan
Go to this URL https://dashboard.heroku.com/apps
. You'll see all your applications that are linked with your github account. Click on the app that you want to remove. Below you will find 'Delete App' icon. Click on it. A prompt will appear for final warning, just write the name, delete it and you're done.
转到此 URL https://dashboard.heroku.com/apps
。您将看到与您的 github 帐户相关联的所有应用程序。单击要删除的应用程序。您会在下方找到“删除应用程序”图标。点击它。将出现最后警告的提示,只需写下名称,将其删除即可。