how do i know if a submodule has changed in git?

Currently I have a few submodules in my parent project. How can I tell if one of the submodules has recently changed and I need to do a

git submodule foreach git pull origin master

  • Disable Git LFS for a remote
  • GIT push not pushing commits to remote
  • How to transplant branch from one repository to a new one without history?
  • Netbeans git can't checkout local branch - Conflicts during checkout
  • Understanding Git for Visual Studio 2015: Revert
  • How do I count the number of git commits affecting a given subtree?
  • Is it safe to include in .gitignore Visual Studio *.tlog files?
  • Best practice for multiple vagrant boxes
  • Format git log output with sed, awk, or the like
  • Git Pull Aborting
  • Confused on git workflow (PHP/MySQL)
  • How to see all local commits which are not pushed to the remote branch?
  • 2 Solutions collect form web for “how do i know if a submodule has changed in git?”

    Submodules are nothing more then nested git repositories.

    Try this command, I don’t have any repositories with submodules to test it on.

    git submodule foreach 'echo $path `git status`'
    git pull --recurse-submodules=yes
    Git Baby is a git and github fan, let's start git clone.