无法推送到现有的heroku应用程序

时间:2013-12-14 19:08:39

标签: git heroku

所以我在我的heroku中有这个应用程序,我想把我的代码推入其中。 我做了一个heroku git:remote -a harjutus2,它告诉我Git remote heroku allready exist。我做错了什么?

3 个答案:

答案 0 :(得分:1)

This nice article解释了heroku的git基础知识。

要推送,首先必须commit

尝试:

git commit -am "1st"
git remote add heroku
git push  heroku master

这些是不同的命令。尝试一个接一个地运行它们。

答案 1 :(得分:0)

像这样更新你的git分支后:

  • git add .
  • git commit -m "Insert Any Description you choose"
  • git push origin your-branch-name

执行此操作以使用新代码更改来更新已存在的heroku:

  • git push heroku your-branch-name:master

答案 2 :(得分:0)

我也遇到过类似的问题

  • git commit -m "My first commit" # 创建初始提交
  • heroku create # 创建一个新应用

#如果要将代码推送到已创建的应用程序

  • heroku git:remote -a quiet-hamlet-92495(提及 在 Heroku 中创建的应用程序)
  • git push heroku master

这将解决问题

相关问题