4 ms·
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 dum
by avar 16y ago
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