从不同的设备更新 Heroku App?

Updating Heroku App from different device?

我正在从不同的设备构建我的 Express.js 服务器应用程序。我在 PC 和笔记本电脑上使用相同的 git 分支。我从我的笔记本电脑上成功部署了它。但是当我尝试更新一些代码并尝试使用以下命令从我的 PC 推送时,问题就出现了:$ git push heroku main.

它returns结果如下:

$ git push heroku main
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

有什么我遗漏的吗?感谢您的协助。

您是否忘记使用 heroku cli 将 heroku 添加为 git 远程?
heroku git:remote -a example-app

https://devcenter.heroku.com/articles/git#for-an-existing-app