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

MMA
Differences between revisions 3 and 4
Revision 3 as of 2011-10-01 01:31:18
Size: 1235
Editor: ytoku
Comment:
Revision 4 as of 2011-10-01 01:33:59
Size: 1239
Editor: ytoku
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
Line 8: Line 9:
$ chmod -R g+w .
$ vim config
 [core]
         repositoryformatversion = 0
         filemode = true
         bare = true
+ sharedrepository = 1
-[remote "origin"]
- url = /export/repositories/git/moinmoin-hack.git
Line 19: Line 30:
$ chmod -R g+w .
$ vim config
 [core]
         repositoryformatversion = 0
         filemode = true
         bare = true
+ sharedrepository = 1
-[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/
$ chmod -R g+w .
$ vim config
 [core]
         repositoryformatversion = 0
         filemode = true
         bare = true
+        sharedrepository = 1
-[remote "origin"]
-        url = /export/repositories/git/moinmoin-hack.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以外に入っていないので削除した。

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