• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Deeper Scenery

Further up and further in

  • Home
  • Blog
  • Code
  • Tutorials
  • Privacy Policy
You are here: Home / Code / Recursively sync Git repositories

Code, Ideas · Published: March 21, 2019 · Modified: March 21, 2019

Recursively sync Git repositories

This is just a small idea. For more information, see this blog post.

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.

Filed Under: Code, Ideas

Previous Post: « Create Local WordPress site with Valet+
Next Post: Thoughts on Change »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Subscribe to jeremypry.com

Enter your email address to subscribe to this site and receive notifications of new posts by email.

  • Home
  • Blog
  • Code
  • Ideas
  • Tutorial
  • Gifts
  • Privacy Policy

Copyright © 2025 · JPry Showcase Pro on Genesis Framework · WordPress · Log in