【问题标题】:Project is not pushed in Heroku项目未在 Heroku 中推送
【发布时间】:2020-09-23 01:45:39
【问题描述】:

所以我想在 Heroku 中推送我的项目的所有新变化。但是,所有更改都会直接推送到我自己的 GitHub 存储库而不是 Heroku。

我收到了

git push heroku production:master
Everything up-to-date

带远程-v

heroku  git@github.com:theo82/expensify-react-app.git (fetch)
heroku  git@github.com:theo82/expensify-react-app.git (push)
origin  git@github.com:theo82/expensify-react-app.git (fetch)
origin  git@github.com:theo82/expensify-react-app.git (push)

我对 Heroku 的 git 的了解是

v10  Set FIREBASE_API_KEY, FIREBASE_AUTH_DOMAIN, FIREBASE_DATABASE_URL, FIREBASE_PROJECT_ID, FIREBA…  email@gmail.com  2020/06/04 08:56:20 +0300 (~ 23m ago)
v9   Remove KEY config vars                                                                           email@gmail.com  2020/06/04 08:52:11 +0300 (~ 27m ago)
v8   Set KEY config vars                                                                              email@gmail.com  2020/06/04 08:45:03 +0300 (~ 34m ago)
v7   Deploy 3284670f                                                                                  email@gmail.com  2020/05/28 08:01:17 +0300
v6   Deploy 8a0c21d0                                                                                  email@gmail.com  2020/05/27 19:36:41 +0300
v5   Deploy b128207e                                                                                  email@gmail.com  2020/05/27 18:01:10 +0300
v4   Deploy 21c22fda                                                                                  email@gmail.com  2020/05/25 19:26:36 +0300
v3   Deploy 36ba978f                                                                                  email@gmail.com  2020/05/22 09:39:14 +0300
v2   Enable Logplex                                                                                   email@gmail.com  2020/05/22 08:58:26 +0300
v1   Initial release                                                                                  email@gmail.com  2020/05/22 08:58:26 +0300

当然,我搞砸了,但我看不出在哪里。我尝试了here 发布的解决方案,但仍然遇到同样的问题。我该如何解决?

谢谢, 西奥。

【问题讨论】:

    标签: reactjs git heroku


    【解决方案1】:

    您的 heroku git 远程配置错误。

    $ git remote -v
    heroku  git@github.com:theo82/expensify-react-app.git (fetch)
    heroku  git@github.com:theo82/expensify-react-app.git (push)
    origin  git@github.com:theo82/expensify-react-app.git (fetch)
    origin  git@github.com:theo82/expensify-react-app.git (push)
    

    它们都指向你的 GitHub。您需要修复 Heroku 遥控器。首先移除 Heroku 遥控器

    $ git remote rm heroku
    $ git remote -v
    origin  git@github.com:theo82/expensify-react-app.git (fetch)
    origin  git@github.com:theo82/expensify-react-app.git (push)
    

    确定 Heroku 遥控器的链接。

    添加 Heroku 遥控器。

    $ git remote add heroku https://git.heroku.com/yourappname.git
    $ git remote -v
    heroku  https://git.heroku.com/yourappname.git (fetch)
    heroku  https://git.heroku.com/yourappname.git (push)
    origin  git@github.com:theo82/expensify-react-app.git (fetch)
    origin  git@github.com:theo82/expensify-react-app.git (push)
    

    git push heroku master推送

    【讨论】:

      猜你喜欢
      • 2014-01-10
      • 1970-01-01
      • 2013-01-09
      • 2013-01-07
      • 2014-06-26
      • 1970-01-01
      • 2019-04-16
      • 1970-01-01
      • 2018-02-22
      相关资源
      最近更新 更多