On Fri, Feb 27, 2009 at 5:11 PM, John Dlugosz <JDlugosz@xxxxxxxxxxxxxxxx> wrote: > I'm merging two branches: let's say "dev" is for development of future > releases, and "rel" is changes made to the current release for immediate > application. Now I want to bring the changes made in rel back to dev. > > Rather than trying to merge it all at once, I'm applying the changes a > few at a time and making sure it still compiles as I go. Then, > git-reset and I have dev as my HEAD and the desired merge result in the > working tree. > > Now, I want to introduce the proper commit node to show that this is the > graft. But, I don't want to be presented with all the differences that > I already resolved; I know what it should look like already. How do I > commit the current state of things and have it show up with both dev and > rel as parents? (then make that the new dev) > > I'm also interesting in learning how to do it better next time. But I'm > doing the incremental merging now and need to know how to conclude it. So, if I understand correctly, you've manually applied (manually applying diffs or something?) your changes from the release branch to the dev branch, and now want to inform git of what happened? If so, you could commit what you have now, use a graft to change its parentage, then git-filter-branch to actually update the commit object. Something like this, I believe: git commit -m 'Merge .....' echo '<full 40-character commit ID of the merge> <parent on the dev branch> <parent on the release branch>' >> .git/info/grafts git-filter-branch dev~..dev ## You can remove (that line from) .git/info/grafts now In the future, you may want to perform this sort of incremental merge by simply git merging intermediate revisions in the release branch. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html