首页 > 解决方案 > 在 github 上更改用户名后 Heroku 出错

问题描述

首先,这可能与用户名更改无关,但这似乎是最可能的原因。

在 Github 上更改我的用户名后,我正在尝试更新我的 heroku 应用程序上的代码。推送到 Heroku 后,我得到以下信息。

! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://git.heroku.com/appname.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

标签: githubheroku

解决方案


git pull默认情况下,会从origin(可能指 GitHub)中提取,而不是heroku.

检查您的遥控器:

git remote -v

试一试git pull heroku


推荐阅读