Git Mailing List Archive on lore.kernel.org
 help / color / 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

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

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, back to index

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

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git