首先,这可能与用户名更改无关,但这似乎是最可能的原因。
在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.
答案 0 :(得分:0)
git pull
默认情况下将从origin
(可能指GitHub)中提取,而不是heroku
。
使用以下方法检查您的遥控器
git remote -v
尝试git pull heroku