Forrest logo
back to the git tool

git-log:tldr:08cd7

git-log: Show commits between two dates (yyyy-mm-dd).
$ git log --before="${2017-01-29}" --after="${2017-01-17}"
try on your machine

The command git log --before="${2017-01-29}" --after="${2017-01-17}" is used to view the commit history of a Git repository filtered within a specific date range.

Here's the breakdown of the command:

  • git log: This is the Git command to view the commit history of the repository.

  • --before="${2017-01-29}": This option is used to filter the commit history and only display commits that happened before the specified date. In this case, the date is set to January 29, 2017.

  • --after="${2017-01-17}": This option is used to filter the commit history and only display commits that happened after the specified date. In this case, the date is set to January 17, 2017.

The dates used in the command are represented using the format ${YYYY-MM-DD}, where YYYY is the year, MM is the month, and DD is the day.

By combining these options, the command allows you to view all commits that occurred between January 17 and January 29, 2017.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the git tool