ログイン
編集不可のページディスカッション情報添付ファイル
"ytoku/daily-record/2011-10-01"の差分

MMA
1と2のリビジョン間の差分
2011-10-01 01:19:12時点のリビジョン1
サイズ: 1007
編集者: ytoku
コメント:
2011-10-01 01:27:56時点のリビジョン2
サイズ: 1069
編集者: ytoku
コメント:
削除された箇所はこのように表示されます。 追加された箇所はこのように表示されます。
行 4: 行 4:
$ git clone --bare --shared --no-hardlinks moinmoin-hack.git yamlbbs.git $ git clone --bare --no-hardlinks moinmoin-hack.git yamlbbs.git
行 19: 行 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 (最終更新日時 2011-10-01 02:18:27 更新者 ytoku)