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

MMA
Differences between revisions 2 and 3
Revision 2 as of 2011-10-01 01:27:56
Size: 1069
Editor: ytoku
Comment:
Revision 3 as of 2011-10-01 01:31:18
Size: 1235
Editor: ytoku
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
[core]  [core]
         repositoryformatversion = 0
         filemode = true
         bare = true
Line 23: Line 26:
-[remote "origin"]
- url = /export/repositories/git/moinmoin-hack.git

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]
         repositoryformatversion = 0
         filemode = true
         bare = true
+        sharedrepository = 1
-[remote "origin"]
-        url = /export/repositories/git/moinmoin-hack.git

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

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