Link Heroku commits to Github?

ε祈祈猫儿з 提交于 2019-12-05 14:16:04

Yes, if you push your code to github then you'll see the log messages - Heroku is after all just a remote git repo, just like github is.

If you push your code to Heroku, it will not show up in Github unless you do the following. If you want to see your code in Github you must add Github as a remote repository along with your heroku repository.

git remote add origin https://git.heroku.com/repo.git
git remote set-url --add origin https://github.com/username/repo.git

Now every time you push your commits to heroku it will also push it to github

git push origin

Now when you click on the commit links in Heroku's Revisions tab, they will link you to Github.

Github does not know this information as your just pushing new commits to heroku server.

However, you can locally view which commit heroku is on right now (assuming remote name is "heroku"):

$ git show heroku/master
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!