Carsten Fuchs wrote in message:
> However, having to convert an existing repository from Subversion, where
> need grafting to reproduce the proper branching structure, the conversion
reduces to the
> "Can I combine grafting with the subtree merging strategy?"
> That is, when I write the .git/info/grafts file, can I have some of the
merges be done
> with the subtree strategy?
Actually, I don't think you need to make 'grafting mergs done with the
subtree strategy'. When you use grafts, you change the parent of the
commits, but you don't change the snapshot of the repository corresponding
with the commit. Let's say you had this situation:
trunk/ExtLibs/lua1 corresponding to commit A on branch master in the git
Now you update the vendor lua:
vendor/lua2, corresponding to commit B on branch vendor
Then you did the svn merge to get
trunk/ExtLibs/lua2 corresponding to commit C on branch master.
Note that using svn, you did a sort of subtree merge, so that commit C has
the right content, the only problem is that the parent of C is A, not A and
B. So you use a graft to add B as a parent of C, but it won't change the
content of C, so in the git side it will look exactly as if you had done a
subtree merge too (git only store the result of the merge, now how it was
In your preceding posts, you said that if you had put the vendor branches
vendor/ExtLibs/lua1 you knew how to do it using grafts. My point is that
1) you can use git-filter to make it looks like the vendor branches were
always in vendor/ExtLibs/*
2) You don't need to do that anyway, just graft the right commit in branch
vendors and things will work
(by the way there is a tool called git replace which can replace any
objects, not just commits like grafts do, so you can do funny things
with it, but i don't think you will need it)
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at