I regularly work with many WordPress plugin codebases. This means that my wp-content/plugins/
directory is full of individual Git repositories. Of course, there are also some plugins that are not Git repositories.
I regularly use hub
to enhance my Git command line experience. I found myself wanting to synchronize all of these repos in one go, without needing to worry about whether a directory was actually a Git repository or not. So I wrote a simple bash script to solve the problem:
This script will find all of the Git repositories within the current directory, and then run hub sync
for each one. Normally I have hub
aliased to git
, since it is meant to be a drop-in replacement that provides enhanced functionality. But my aliases don’t carry over to the bash script, so I call hub
directly.
Leave a Reply