Gitで全てをコミットした後でmodule不使用にも関わらず、下層ディレクトリでmodified: と表示される場合

スポンサーリンク

Gitで全てをコミットした後でmodule不使用にも関わらず、下層ディレクトリでmodified: と表示される場合。

以下のような状態

On branch develop
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

    modified:   wp-content/themes/wpphone (modified content, untracked content)

no changes added to commit (use "git add" and/or "git commit -a")

単純に、上記ディレクトリにもう一つGitが設定されている場合がある。上記の場合で言えば、ルートにてgit initされて.gitディレクトリが設定されているのに加えて、

wp-content/themes/wpphone

のディレクトリにもgit initされて.gitディレクトリが存在する状態になる。

ちなみに下層ディレクトリにもGitがある場合、そのディレクトリでgitコマンドを打つと、上層のGitではなくそのディレクトリにあるGitへの登録が優先される。

タイトルとURLをコピーしました