Login
Immutable PageDiscussionInfoAttachments
Diff for "ytoku/daily-record/2011-10-01"

MMA
Differences between revisions 1 and 2
Revision 1 as of 2011-10-01 01:19:12
Size: 1007
Editor: ytoku
Comment:
Revision 2 as of 2011-10-01 01:27:56
Size: 1069
Editor: ytoku
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
$ git clone --bare --shared --no-hardlinks moinmoin-hack.git yamlbbs.git $ git clone --bare --no-hardlinks moinmoin-hack.git yamlbbs.git
Line 19: Line 19:
$ chmod -R g+w .
$ vim config
[core]
+ sharedrepository = 1

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

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

$ git clone --bare --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)
$ chmod -R g+w .
$ vim config
[core]
+        sharedrepository = 1

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

ytoku/daily-record/2011-10-01 (last edited 2011-10-01 02:18:27 by ytoku)