Pushing all submodules recursively
问题 I wrote the below script to push all the changes in the workspace, both in the submodules and the superproject. However, it sounds a little odd that, it is this complex to do what I want. Is there any better way, that I'm missing? #!/bin/bash if [ "$#" -ne 1 ]; then echo "Illegal number of parameters" exit fi SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "${SCRIPT_DIR}/../submodule1" git status git add -A git commit -m "$1" git push origin master cd "${SCRIPT_DIR}/..