# Using grafts file to rewrite history

2 messages from 2009-02-25 to 2009-02-25. Participants: Peter Krefting, Jeff King.
Thread: https://gitlist.dev/t/18008

## Peter Krefting, 2009-02-25 05:29

Subject: Using grafts file to rewrite history
Message-ID: <Pine.LNX.4.64.0902250626300.9572@ds9.cixit.se>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0902250626300.9572%40ds9.cixit.se

```
Hi!

My googling powers have yet eluded to find me an answer to this:

Given an (unpublished) Git repository and a "grafts" file that slightly
re-orders commits, how do I reprocess this repository (using
git-filter-branch, probably) to have a true history according to the
"grafts" file?

I am trying to use git-import-tars to import non-linear development
history, and then use a grafts file to find the "proper" history. I
would like to re-order the history before i publish it in a public Git
repository.

-- 
\\// Peter - http://www.softwolves.pp.se/

```

## Jeff King, 2009-02-25 06:10

Subject: Re: Using grafts file to rewrite history
Message-ID: <20090225061018.GA6211@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20090225061018.GA6211%40coredump.intra.peff.net
In-Reply-To: <Pine.LNX.4.64.0902250626300.9572@ds9.cixit.se>

```
On Wed, Feb 25, 2009 at 06:29:46AM +0100, Peter Krefting wrote:

> Given an (unpublished) Git repository and a "grafts" file that slightly
> re-orders commits, how do I reprocess this repository (using
> git-filter-branch, probably) to have a true history according to the
> "grafts" file?

Running filter-branch at all will glue the grafts together. It is even
one of the examples given in the git-filter-branch(1) manpage.

-Peff

```
