間違いだらけの備忘録

このページの内容は無保証でありこのページの内容によって直接、または間接に損害を受けられたとしても私は責任を取りません。

Error: repository has at least one unnamed head

上記で作ったリポジトリが上記エラーでgit hg fetchできなくなっていた。元の大規模変更による影響?
結局元ディレクトリを消して

$ git hg clone

下記を実施

$ rm -rf .git/hgremote
$ .git/hgcheckout/
$ cp -rp ../repo2/.git/hgremote .git/
$ cp -rp ../repo2/.git/hgcheckout/ .git/

が結局Error: repository has at least one unnamed head
が出るのは変わらず。

$ git-hg fetch --force

再実行

参考
https://github.com/cosmin/git-hg/issues/12
https://github.com/cosmin/git-hg/commit/fcbd3f6296a354d081ba650056bee3721c1c24af

$ git clone --force hoge 
このページにはhatena以外のサービスからのコンテンツが埋め込まれています。 hatenaによりGoogle AdSense 広告が埋め込まれています。