2010年8月18日 星期三

Cutting git history

Re: Cutting history
http://www.spinics.net/lists/git/msg134997.html

Thiago Macieira on #git provided the answer. You can do that with
grafts and git filter-branch. E.g. rewriting the history so that you
only have the 7 latest commits:

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

沒有留言: