Can I get git log to print the history in reverse order?

I recently learned that I can get hg log to print the history in reverse order with:

hg log -r :

So of course I tried:

  • How to make git-svn use specific version of SVN?
  • Equivalent of `git add --force` to add ignored files in Emacs' Magit
  • Git Quota Limits
  • How to show only filenames by commiter with git log
  • Is there a way to “persistently” synchronize a git repository with SVN?
  • Comparing and merging modified files in github
  • git log -r :

    Well, it didn’t work. So what is the command to do the same thing in git?

  • Combine old log entries from git log
  • Develop on windows, run unicorn in production on heroku
  • How to push github clone to new github repo?
  • Git bash store GITHUB credentials Windows
  • Git says a file is unmerged and I can't commit, but the file seems to be merged
  • Error with git over https push to remote server fatal could not switch to :permission denied
  • 4 Solutions collect form web for “Can I get git log to print the history in reverse order?”

    Use the --reverse option:

    git log --reverse

    You don’t need to type --reverse all the time, nor do you need a bash function. You can just create a git alias. Open up your favorite text editor and open up your global .gitconfig file. It’s usually found in your home directory.

    Navigate to or create a section like this:

        lg = log -10 --reverse

    That creates a git alias that grabs the ten most recent commits then reverses that list so the most recent of those 10 is at the bottom. Now you can simply run:

    git lg

    Jakub Narębski’s comment (“Note that e.g. git log -10 --reverse would get 10 last commits then reverse list”) has been clarified in Git 2.11 (Q4 2016):

    See commit 04be694 (27 Sep 2016) by Pranit Bauva (pranitbauva1997).
    (Merged by Junio C Hamano — gitster — in commit 54a9f14, 11 Oct 2016)

    rev-list-options: clarify the usage of –reverse

    Users often wonder if the oldest or the newest n commits are shown by log -n --reverse.
    Clarify that --reverse kicks in only after deciding which commits are to be shown to unconfuse them.

    See Commit Limiting.

    You could create a bashrc function (assuming you are on a unixy os)

    function git_logr {
        git log --reverse
    Git Baby is a git and github fan, let's start git clone.