submoduleの変更が元に戻せない
事象
checkout しても resetしても、cleanな状態にならない
$ git diff diff --git a/playbooks/roles/mysql b/playbooks/roles/mysql index hoge1..hoge2 160000 --- a/playbooks/roles/mysql +++ b/playbooks/roles/mysql @@ -1 +1 @@ -Subproject commit hoge1 +Subproject commit hoge2 修正したが、修正を元に戻しすと稀に発生する差分がsubmodule内で発生した
解決
$ git submodule update $ git status On branch feature/hoge Your branch is up to date with 'origin/feature/hoge nothing to commit, working tree clean tips
未検証
サブモジュールディレクトリでgit checkout 025ffcを実行してからgit add SubmoduleNameを実行します。 git commit -mメインディレクトリの「some message」
This post is licensed under CC BY 4.0 by the author.