From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 2F8BD1F45E for ; Fri, 14 Feb 2020 06:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726173AbgBNGcO (ORCPT ); Fri, 14 Feb 2020 01:32:14 -0500 Received: from cloud.peff.net ([104.130.231.41]:43180 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725897AbgBNGcO (ORCPT ); Fri, 14 Feb 2020 01:32:14 -0500 Received: (qmail 19213 invoked by uid 109); 14 Feb 2020 06:32:14 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Fri, 14 Feb 2020 06:32:14 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 19285 invoked by uid 111); 14 Feb 2020 06:41:10 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 14 Feb 2020 01:41:10 -0500 Authentication-Results: peff.net; auth=none Date: Fri, 14 Feb 2020 01:32:13 -0500 From: Jeff King To: gritzmann Cc: "git@vger.kernel.org" Subject: Re: How do I change the AuthorDate and CommitDate of all my commits? Message-ID: <20200214063213.GC605125@coredump.intra.peff.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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