git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How do I change the AuthorDate and CommitDate of all my commits?
@ 2020-01-16 11:30 gritzmann
  2020-02-14  6:32 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: gritzmann @ 2020-01-16 11:30 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi,

I*m looking to completely anonymize the timestamps of my files and repos For the files themselves I changed their access, modify, change and birth times like this: `touch -acm -d "1980-01-01 00:00:00"`.

But how do I do the same for the AuthorDate and CommitDate of all my commits?

Thanks!

Sent with ProtonMail Secure Email.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How do I change the AuthorDate and CommitDate of all my commits?
  2020-01-16 11:30 How do I change the AuthorDate and CommitDate of all my commits? gritzmann
@ 2020-02-14  6:32 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2020-02-14  6:32 UTC (permalink / raw)
  To: gritzmann; +Cc: git@vger.kernel.org

On Thu, Jan 16, 2020 at 11:30:10AM +0000, gritzmann wrote:

> I*m looking to completely anonymize the timestamps of my files and
> repos For the files themselves I changed their access, modify, change
> and birth times like this: `touch -acm -d "1980-01-01 00:00:00"`.
> 
> But how do I do the same for the AuthorDate and CommitDate of all my
> commits?

If you're just creating the commits now, you can set $GIT_AUTHOR_DATE
and $GIT_COMMITTER_DATE in the environment. Like:

  export GIT_AUTHOR_DATE='1980-01-01 00:00:00 +0000'
  export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"

If you have existing commits, you'll have to look into rewriting them
with git-filter-branch, or piping git-fast-export to git-fast-import and
modifying the stream in between.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-14  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 11:30 How do I change the AuthorDate and CommitDate of all my commits? gritzmann
2020-02-14  6:32 ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).