Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Documentation/date-formats.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,16 @@ ifdef::git-commit[]
In addition to recognizing all date formats above, the `--date` option
will also try to make sense of other, more human-centric date formats,
such as relative dates like "yesterday" or "last Friday at noon".
+
The following special keywords are also recognized:
+
`now`;; the current date and time.
`yesterday`;; yesterday's date at the current time.
`noon`;; today (or the given date) at 12:00.
`midnight`;; today (or the given date) at 00:00.
`tea`;; today (or the given date) at 17:00.
`never`;; a zero timestamp (used e.g. by linkgit:git-reflog[1]).
+
These keywords can be combined with other date constructs, for
example `yesterday noon` or `3.days.ago`.
endif::git-commit[]
5 changes: 4 additions & 1 deletion Documentation/git-commit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ See linkgit:git-rebase[1] for details.
the commit author is then copied from the first such commit found.

`--date=<date>`::
Override the author date used in the commit.
Override the author date used in the commit. See the
"DATE FORMATS" section below for accepted formats,
including human-readable strings like `now`, `yesterday`,
and `noon`.

`-m <msg>`::
`--message=<msg>`::
Expand Down
Loading