LOADING

読み込みが遅い場合はキャッシュを有効にしてください。ブラウザはデフォルトで有効になっています

git: A git directory for 'xxxx' is found locally with remote(s)

2024/1/7 AI git

問題

❯ git submodule add https://github.com/volantis-x/hexo-theme-volantis .\themes\volantis
fatal: A git directory for 'themes/volantis' is found locally with remote(s):
  origin        https://github.com/volantis-x/hexo-theme-volantis
If you want to reuse this local git directory instead of cloning again from
  https://github.com/volantis-x/hexo-theme-volantis
use the '--force' option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the '--name' option.

解決策

  • .git/moduleに対応のフォルダを削除する
❯ rm -r .\.git\modules\themes\volantis\

原因

前回のgit submodule addで追加しでも、ダウンロードは完全しなく、途中で中断した可能性がある。こうして、.git/modulesthemes/volantisフォルダがキャッシュとして残っても、目標のフォルダthemes/volantisが作成されなかった。

avatar
lijunjie2232
個人技術ブログ
My Github
目次0