foerever
foerever

Reputation: 335

How to view entire commit history with heroku?

I know you can use git log to view the log history but it only shows me the past 12 commits. How can I see the past 100. I've looked for an answer for this but nothing seems to work? I want to be able to see the date I pushed the commit and also the comment I added with it.

If this is a duplicate please comment rather than immediately down voting. I reply fast!

Upvotes: 2

Views: 7228

Answers (1)

Gino Mempin
Gino Mempin

Reputation: 29590

Heroku is just using plain old git.

First thing you need to do is to get Heroku's copy of the repo on your local environment.

  • If you're deploying to Heroku using git push heroku master, do:

    git checkout heroku/master

  • If you have a separate copy of your Heroku repo (where origin=<your heroku repo>), do:

    git checkout master
    git pull (to update your local copy)

Then you can just do the same git log command to view the commit history.

By default, the git log output will contain the entire commit history and will be automatically paginated (which may be why you're only seeing the first 12 commits?). You'll have to press spacebar or some other navigation keys to view the entire log. You can turn pagination off by adding the --no-pager option, as in git --no-pager log to display the entire log for you to scroll through.

To view a specific N commits, add the -n option, as in git log -n 100 to get the past 100 commits.

If you're only interested in the date and the commit message, you can format the log output to only show the relevant info, as in git log --pretty="%aD : %s".

For more logging options, see the git log documentation.

Upvotes: 5

Related Questions