

Git: Grafting repositories - ben_straub
http://ben.straubnet.net/post/939181602/git-grafting-repositories

======
tzs
There's no need for grafts for what they are doing. "git filter-branch
--parent-filter" will do what they want without any need to much around by
hand with anything in the .git directory. There's even an example in the man
page for that command showing how to use it for exactly what they are doing.

------
avar
Grafts allow you to do a bunch of other neat stuff. I use Git as a backup
system for SQL dumps, but since the repository will grow a lot I want to throw
old dumps away.

So I just create a graft and rewrite my history so that it only contains 7
commits (7 days):

    
    
        git rev-list HEAD | sed '7q;d' > .git/info/grafts &&
        git filter-branch -f HEAD

------
seiji
I had to deal with this a while ago. Scripts resulting from my troubles are at
<http://github.com/mattsta/git-shrink>

