Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 731 Bytes

using-commands-with-a-relative-date-format.md

File metadata and controls

27 lines (19 loc) · 731 Bytes

Using Commands With A Relative Date Format

If you want to know what changed on a branch since last week, you can more or less ask just like that:

$ git log --since="1 week ago"

Or, what has happened since yesterday:

$ git log --after="yesterday"

The --since/--after flags, and their counterparts --until/--before, accept a variety of date formats including relative dates.

Relative dates can be used with other commands and even as a ref modifier. For instance, this is a way of comparing develop from a week ago with develop from two weeks ago:

$ git diff develop@{"1 week ago"} develop@{"2 weeks ago"}

source