サイズ: 1007
コメント:
|
← 2011-10-01 02:18:27時点のリビジョン5 ⇥
サイズ: 1828
コメント:
|
削除された箇所はこのように表示されます。 | 追加された箇所はこのように表示されます。 |
行 4: | 行 4: |
$ git clone --bare --shared --no-hardlinks moinmoin-hack.git yamlbbs.git | $ git clone --bare --no-hardlinks moinmoin-hack.git yamlbbs.git |
行 7: | 行 7: |
行 8: | 行 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 |
|
行 22: | 行 33: |
= yamlbbsの適当なリビジョンを安定版として運用する = まずstableブランチを作ってpushする。 {{{ $ git branch stable HEAD $ git push origin stable Enter passphrase for key '/home/ytoku/.ssh/id_rsa': Total 0 (delta 0), reused 0 (delta 0) To ssh://nest/export/repositories/git/yamlbbs.git * [new branch] stable -> stable }}} 本番環境ではstableブランチを追いかけるようにする。 {{{ $ git clone -b stable /export/repositories/git/yamlbbs.git $ chmod -R g+w yamlbbs/ $ vim yamlbbs/.git/config (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/ $ 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以外に入っていないので削除した。
yamlbbsの適当なリビジョンを安定版として運用する
まずstableブランチを作ってpushする。
$ git branch stable HEAD $ git push origin stable Enter passphrase for key '/home/ytoku/.ssh/id_rsa': Total 0 (delta 0), reused 0 (delta 0) To ssh://nest/export/repositories/git/yamlbbs.git * [new branch] stable -> stable
本番環境ではstableブランチを追いかけるようにする。
$ git clone -b stable /export/repositories/git/yamlbbs.git $ chmod -R g+w yamlbbs/ $ vim yamlbbs/.git/config (sharedrepository=1)