Git Committer Date is Author Date (Amend)

Amend the last commit (HEAD) and set the committer date as the author date – as “–committer-date-is-author-date” may have done (a git-rebase option):

GIT_COMMITTER_DATE="$(git show -s --format=%at HEAD)" git commit \
--amend -C HEAD

(Explainshell)

Git Author Date is Committer Date (Amend)

And for setting the author date to the committer date while keeping the committer date:

GIT_COMMITTER_DATE="$(git show -s --format=%ct HEAD)" git commit \
--amend -C HEAD --date="$(git show -s --format=%ct HEAD)"

(Explainshell)


Previously:


Image motives based on a visual excerpt from a TV series episode named “git gone” which is also the imaginary product name, the further text reads “kills bugs on contact” on the spray can label.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.