Hi, On Sun, Nov 15, 2009 at 10:52:16AM +0800, Da Zheng wrote:
> However, the problem is that the code of the driver was checked in to > my Hurd git repository and there are many irrelevant commits in the > history of the branch for developing the user-level driver because I > created the branch from the latest revision in the repository at that > moment. I really should have created the branch based on the root > commit of the repository:-( > > Now I only want to check in the pcnet32 driver. I thought that if I > generated patches of developing the driver and somehow applied them to > the incubator repository, I could keep the development history. But I > didn't manage to do it. I guess there should be no automatic way to do > it. I have to apply one patch and check in the change manually one by > one. If I understand correctly what you want to do, this shouldn't actually be too hard... Just create a new branch for the driver from your current HEAD, and rebase it to include only the relevant commits -- either using rebase with --onto, or rebase -i. (The latter doesn't require much understanding of how git works -- which, depending on the situation, can be considered either an advantage or a disadvantage :-) ) Alternatively you could create a patch series containing the relevant commits with git format-patch, and then apply them with git am to a new branch created from origin/master. (rebase actually does more or less the same automatically...) -antrik-