I\'ve two or more projects (let\'s call them ProjectFoo and ProjectBar) having some common code that I put in a submodule
Notice:
git submodule foreach 'git commit -a'
will fail if one of the submodules containt no commit to do.
To get rid of this, you have to force the command result to 0.
git submodule foreach "git commit -am 'your comment' || echo ' '"
By using the echo piped you force the whole command to return with 0 and continue executing the commit command on the other submodules