Git development
 help / color / mirror / Atom feed
From: "Gontu Sujith Reddy via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Gontu Sujith Reddy <gontusujith2009@gmail.com>,
	GontuSujithReddy <gontusujith2009@gmail.com>
Subject: [PATCH] git-commit: document --date=now for amended commits
Date: Mon, 23 Nov 2026 09:34:57 +0000	[thread overview]
Message-ID: <pull.2502.git.git.1795426497536.gitgitgadget@gmail.com> (raw)

From: GontuSujithReddy <gontusujith2009@gmail.com>

Amending a commit normally preserves its original author date. Mention
that --date=now sets the author date to the current time when amending.

Signed-off-by: GontuSujithReddy <gontusujith2009@gmail.com>
---
    git-commit: document --date=now for amended commits

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2502%2FGontuSujithReddy%2Fdoc-commit-date-now-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2502/GontuSujithReddy/doc-commit-date-now-v1
Pull-Request: https://github.com/git/git/pull/2502

 Documentation/git-commit.adoc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/git-commit.adoc b/Documentation/git-commit.adoc
index 8329c1034b..ba0d5aeb8f 100644
--- a/Documentation/git-commit.adoc
+++ b/Documentation/git-commit.adoc
@@ -182,6 +182,8 @@ See linkgit:git-rebase[1] for details.
 
 `--date=<date>`::
 	Override the author date used in the commit.
+	When amending a commit, use `--date=now` to set the author date
+	to the current time.
 
 `-m <msg>`::
 `--message=<msg>`::

base-commit: f7de81456940dd6f3274e461149bba12965de609
-- 
gitgitgadget

             reply	other threads:[~2026-11-23  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  9:34 Gontu Sujith Reddy via GitGitGadget [this message]
2026-11-23 19:24 ` [PATCH] git-commit: document --date=now for amended commits Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.2502.git.git.1795426497536.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gontusujith2009@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox