How to view remote Git revision on Heroku

前端 未结 6 1004
感情败类
感情败类 2020-12-12 11:55

For deploying to Heroku, I use git push heroku master. But how do I see which revision I pushed up to heroku? (I\'m often in doubt if I pushed the recent versio

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 12:22

    If you've just pushed and want to make sure you're up-to-date, then you can just run git remote show heroku and you'll see output similar to this:

    * remote heroku
      Fetch URL: git@heroku.com:XXX.git
      Push  URL: git@heroku.com:XXX.git
      HEAD branch: master
      Remote branch:
        master tracked
      Local ref configured for 'git push':
        master pushes to master (up to date)
    

    That (up to date) at the end will be replaced by (fast forwardable) if it is not up to date.

    Or, if you're wanting to see the full commit log for the heroku remote, the only way I know how is to check it out first. git checkout heroku/master will give you the current commit hash and commit comment: HEAD is now at ... , and git log will give you the rest of the story.

提交回复
热议问题