On Jan 8, 2010, at 12:00 AM, Christian Couder wrote: > What you could perhaps do with "git replace" or a graft is to change the > merge commit so that it has only one parent instead of 2. Thanks, also to Avery for his idea with "git .", which works well for me. For the benefit of others, here's what I've done in the end in order to get rid of the extra 100,000 commits in the old upstream branch. A very simple little script takes care of remapping the merges of the old upstream branch to the new one. It takes the output of this git log --since=2009-01-01 --format="%H %f" on each of the two upstream branches and finds corresponding commits using the first commit line. With this alignment in place, we then need the list of merge commits that need to be redirected: export BRANCHES='b1 b2 b3' git log --since=2009-01-01 --author="my name" --format="%H %P" $BRANCHES This can be fairly broad, but I didn't want BRANCHES to contain the upstream branches (even then it probably doesn't matter). I then used a little piece of trivial code to apply the alignment to the parents of potential merge commits, to generate the grafts. This is what's attached, in case anyone will find it useful.