You may or may not find this useful. I work with a my GIT repositories all at the same level. I like to keep them in sync. However going to each repository and repeating the commands is a pain. So I created the following shell script to make my life easier:
#!/bin/sh echo "Issuing command: $@" for d in ./*/ do (cd "$d" && "$@" ) done
To use this, you just need to enter “mdexec pwd” to execute the “pwd” command in each subdirectory. The catch on this you will want/need to run this on each of the subdirectories in your current working directory.
Extending to Multi-Directory GIT
So we now have our “mdexec” command. Our next step is to create “mgit”
#!/bin/sh mdexec git $@
Now all you need to do is “mgit pull” or any standard git command to execute. GIT will be substituted into the command and run in each sub-directory.