Tuesday, July 14, 2015

Many git projects? Save time with mu-repo!

Just a quick time saving tip for when you are working with many interdependent git projects.

mu-repo will perform git operations against a number of projects at once. Think of it as a git command multiplexer.

Install with "pip install mu-repo", and verify it is in your path.

Next, setup a directory like ~/work, or ~/go/src/github.com/pdalinis and clone down all the repositories.

On that parent, do a quick "mu register --all" to add all the child repositories to my .mu_repo file.

Now I can do "mu pull origin master" to update, and "mu st" to view a nice rollup status.

Adding and removing projects from the .mu_repo file is as easy as "mu register <repo>" and "mu unregister <repo>".

It even has excellent documentation when you run just "mu".