git checkout で error が発生する理由が解らなかった話
checkoutで、以下のエラーが出力された。
$ git checkout hoge
error: Your local changes to the following files would be overwritten by checkout:
foo/bar
Please, commit your changes or stash them before you can switch branches.
Aborting
status を見ても、何も変更が無い。
$ git status
On branch hoge
Your branch is up-to-date with 'origin/hoge'.
nothing to commit, working directory clean
謎…。意味分からん。。。と思っていたら --skip-worktreeをしていたことを忘れていた。
--skip-worktreeを解除して、無事checkout出来た。めでたしめでたし。