如何从github拉git并推送到heroku?

如何从github拉git并推送到heroku?,github,heroku,Github,Heroku,我已经在heroku上部署了回购协议。 我通过github开发它 现在我的项目没有本地回购协议。(因为AWS不工作) github的版本比heroku快 我想在heroku上部署最新的github版本。首先登录heroku heroku login 从heroku应用程序克隆 heroku git:clone -a heroku-app-name cd heroku-app-name 检查远程heroku git remote -v 你应该看到 heroku https://git.he

我已经在heroku上部署了回购协议。 我通过github开发它

现在我的项目没有本地回购协议。(因为AWS不工作) github的版本比heroku快

我想在heroku上部署最新的github版本。

首先登录heroku

heroku login
从heroku应用程序克隆

heroku git:clone -a heroku-app-name
cd heroku-app-name
检查远程heroku

git remote -v
你应该看到

heroku  https://git.heroku.com/heroku-app-name.git (fetch)
heroku  https://git.heroku.com/heroku-app-name.git (push)
heroku  https://git.heroku.com/heroku-app-name.git (fetch)
heroku  https://git.heroku.com/heroku-app-name.git (push)
origin  git@github.com:yourname/reponame.git (fetch)
origin  git@github.com:yourname/reponame.git (push)
添加远程源

git remote add origin git@github.com:yourname/reponame.git
git remote -v
你应该看到

heroku  https://git.heroku.com/heroku-app-name.git (fetch)
heroku  https://git.heroku.com/heroku-app-name.git (push)
heroku  https://git.heroku.com/heroku-app-name.git (fetch)
heroku  https://git.heroku.com/heroku-app-name.git (push)
origin  git@github.com:yourname/reponame.git (fetch)
origin  git@github.com:yourname/reponame.git (push)
获取远程源并更新远程heroku

git pull origin master
git push heroku master