我已经在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)
添加远程原点
git remote add origin [email protected]: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)
origin [email protected]:yourname/reponame.git (fetch)
origin [email protected]:yourname/reponame.git (push)
获取远程原点并更新远程heroku
git pull origin master
git push heroku master
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句