如何修复Heroku远程响应“504网关超时”的长时间运行的“git push”?

如何修复Heroku远程响应“504网关超时”的长时间运行的“git push”?,git,heroku,deployment,heroku-cli,Git,Heroku,Deployment,Heroku Cli,我正在尝试对Heroku上托管的git repo的分支执行git推送(force) 不幸的是,经过长时间的等待,这是超时。我用相同的504 GATEWAY\u TIMEOUT错误尝试了多次: $ git push --force my-heroku-remote my-feature-branch:master Counting objects: 12345, done. Delta compression using up to 8 threads. Compressing objects:

我正在尝试对Heroku上托管的git repo的分支执行git推送(force)

不幸的是,经过长时间的等待,这是超时。我用相同的
504 GATEWAY\u TIMEOUT
错误尝试了多次:

$ git push --force my-heroku-remote my-feature-branch:master
Counting objects: 12345, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (12345/12345), done.
error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 GATEWAY_TIMEOUT
fatal: The remote end hung up unexpectedly
Writing objects: 100% (12345/12345), 347.86 MiB | 98.00 KiB/s, done.
Total 12345 (delta 123), reused 1234 (delta 123)
fatal: The remote end hung up unexpectedly
Everything up-to-date

如何才能成功推送到该远程设备?

Heroku支持部门建议重置远程回购,从而成功解决了该问题在运行此命令之前,请绝对确保您在正确的heroku应用程序/repo上执行此操作:

heroku repo:reset -a my-heroku-app
运行上述命令后,git推送工作正常

这将使用Heroku CLI repo插件,您可能需要安装该插件: