$ git submodule update --recursive
error: Your local changes to the following files would be overwritten by checkout:
utilities/helper/fireball.py
Please, commit your changes or stash them before you can switch branches.
Aborting
Unable to checkout ‘de47e4d81a0a91cea31b72f3f24cc459431a1846’ in submodule path ‘lib/ansible/modules/core’
I did not change this file.
Why does this happen?
I know how to “fix” it but I’d like to know what I’m doing wrong.
There are likely numerous situations that could lead to this, such as:
running git pull --recurse-submodules
running git pull while in the core or extras directories
There shouldn’t be a need to run those above commands, after doing a git pull in the main repo or a git fetch you should be able to just run git submodule update --recursive to update those submodules to the pointers/commits specified in the upstream repo.
I’m however unsure of the specific scenario that got you to a point where it appeared that fireball.py was modified. It could just be that you jumped commits between when fireball.py was there, and when it was removed, but done in a way that didn’t actually remove the file.
Current branch devel is up to date.
error: Your local changes to the following files would be overwritten by checkout:
cloud/docker/docker_image.py
Please, commit your changes or stash them before you can switch branches.
Aborting
Unable to checkout ‘e9454fa44f5ff507c0dad3ed91a866854287e4dc’ in submodule path ‘lib/ansible/modules/core’