将克隆的项目从新计算机推送到现有的Heroku应用程序

问题描述

我正在尝试从新计算机上的项目克隆存储库中推送项目更改。我已经将Heroku添加为远程对象,而我的现有项目位于origin/branchname中,但是,当我这样做时:

git push heroku master我收到以下错误

To https://git.heroku.com/myapp.git
 ! [rejected]          master -> master (non-fast-forward)
error: Failed to push some refs to 'https://git.heroku.com/myapp.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

如何将origin/branchname上的更改推送到Heroku?在较旧的系统上,我要做的只是:git push heroku master。我还添加了我的heroku键。并遵循了以下所有步骤:How to link a folder with an existing Heroku app

编辑

我也尝试过强制推送,但出现错误

remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push Failed
remote: !
remote:  ! ## Warning - The same version of this code has already been built: a83ad0723dc584575acbbfd8f5e4ed7a7e3fedaf
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version a83ad0723dc584575acbbfd8f5e4ed7a7e3fedaf
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main

这是因为我克隆了存储库引起的吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)