Jakub Narebski <jnareb@xxxxxxxxx> writes: > I think you want undocumented but for the git-am usage (e.g. 'git am > -h') --rebasing option to git-am, which makes git-am preserve Subject: > line formatting,... I have to warn that that one requires you to have proper commit object to begin with. IOW, the first line "From [0-9a-f]{40} date" must record an existing object name. As you said, "am" is for applying e-mailed patches and filter-branch would be the best fit for fixing imported history, but whichever tool is used, I think it is a mistake to try preserving a "one-line-per-paragraph" format the original poster seems to have, i.e.: foo foo foo foo bar bar bar bar baz baz baz baz Yes, the low-level could create a commit object with a message like that, but all the Porcelains rely on "paragraphs are separated with a blank line" format. So no matter how the conversion is done, I think it would be a good idea to turn the above into: foo foo foo foo bar bar bar bar baz baz baz baz if the user wants to keep the resulting history any useful. To do it with "format-patch | am", you would format it like: Subject: foo foo foo foo From: author name <author.name@domain> Date: author date bar bar bar bar baz baz baz baz -- 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