Skip to content

Instantly share code, notes, and snippets.

@rknightuk
Last active July 25, 2018 07:37
Show Gist options
  • Save rknightuk/7397163 to your computer and use it in GitHub Desktop.
Save rknightuk/7397163 to your computer and use it in GitHub Desktop.
Git log for specific date range.

Everything since a specific month or date:

git log --author="Your Name" --since="month || date" --pretty=format:"%ad - %s

Everything in a specific date range:

git log --author="Your Name" --since="month || date" --before="month || date" --pretty=format:"%ad - %s

Output:

Tues Nov 5 16:41:44 2013 +0000 - This is a commit message

If you just want a list of commits:

git log --author="Your Name" --oneline

Output:

4ee5631 Another commit message

Append --reverse to display from earliest to most recent

Append | subl to open the log in Sublime Text

@benstaker
Copy link

The pretty format parameter is incorrect, it should be:

--pretty=format:"%ad - %s"

@rknightuk
Copy link
Author

Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment