git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git rebase -i without altering the committer date

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 21, 2016, 07:17 UTC
Message-ID
<alpine.DEB.2.20.1604210914420.2826@virtualbox>
In-Reply-To
<571863CE.6090002@kdbg.org>
Hi,
On Thu, 21 Apr 2016, Johannes Sixt wrote:
Show 15 quoted lines
> Am 20.04.2016 um 23:47 schrieb Andreas Schwab:
> > Shaun Jackman <sjackman@gmail.com> writes:
> >
> > > I'd like to insert a commit between two commits without changing
> > > the committer date or author date of that commit or the subsequent
> > > commits.
> >
> > The easiest way to implement that is to add a graft to redirect the
> > parent of the second commit to the inserted commit, then use git
> > filter-branch to make the graft permanent.
> 
> This only inserts a new project state, but does not propagate the changes
> brought in by the new commit to the subsequent commits. This propagation of
> changes could also be done with filter-branch, but it may be difficult
> depending on circumstances.

I agree that rebase -i is the wrong wrench for this job. Either use filter-branch or fast-export/edit/fast-import.

Or take a step back and ask yourself why you need to fool anybody about the commit date... ;-D

Ciao, Johannes

Previous: Johannes Sixt
Message 6 of 6 in “git rebase -i without altering the committer date”
  1. Shaun JackmanApr 20, 2016
  2. Junio C HamanoApr 20, 2016
  3. Shaun JackmanApr 20, 2016
  4. Andreas SchwabApr 20, 2016
  5. Johannes SixtApr 21, 2016
  6. Johannes SchindelinApr 21, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.