尝试将更改推送到远程存储库时,我收到以下错误.
命令
git push heroku
错误
fatal: You are pushing to remote 'heroku', which is not the upstream of
your current branch 'master', without telling me what to push
to update which remote branch.
任何人都可以建议可能导致相同的原因吗?
LAF*_*ica 19
我怀疑你没有远程配置.
推动喜欢知道什么推动和推动它.通常一个配置git,以便它自动跟踪分支(本地 - 远程对).
尝试推送:git push heroku master
假设master是你的本地分支而heroku是一个远程.
另外,要查看是否未配置远程,(l)是您的配置还是(e)dit it:
git config -l / -e
由于Felix在我之前,我将通过设置遥控器来扩展我的答案:
小智 7
git config -l会告诉你:
[branch.master.remote]和[branch.master.merge]
实际上,它们是git pull/push的默认行为,例如,git push == git push [branch.master.remote] [branch.master.merge].
默认情况下,[branch.master.remote] = origin,[branch.master.merge] = master,所以在这种情况下git push = git push origin master.
但是,在你的情况下,你的原点[branch.master.remote]不是heroku,并且git不知道你想推送到哪个heroku*的分支,所以你必须指向git.