Login
Immutable PageDiscussionInfoAttachments

Revision 1 as of 2011-10-01 01:19:12

Clear message
ytoku/daily-record/2011-10-01

MMA

gitリポジトリのサブディレクトリを新しいリポジトリに分割

git filter branch - Detach subdirectory into separate Git repository - Stack Overflowを参考に作業した。

$ git clone --bare --shared --no-hardlinks moinmoin-hack.git yamlbbs.git
Cloning into bare repository yamlbbs.git...
done.
$ cd yamlbbs.git/
$ git filter-branch --subdirectory-filter yamlbbs -- --all
Rewrite c2ff2ea34f0ca84ee1ff29afbc8d48eb44fe79e3 (20/20)
Ref 'refs/heads/master' was rewritten
$ rm -r refs/original/
$ git reflog expire --expire=now --all
$ git gc --aggressive --prune=now
Counting objects: 20, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (20/20), done.
Writing objects: 100% (20/20), done.
Total 20 (delta 0), reused 0 (delta 0)

なお、古いmoinmoin-hackリポジトリはyamlbbs以外に入っていないので削除した。