Skip to content

Instantly share code, notes, and snippets.

@tomaszwro
Last active February 24, 2017 09:36
Show Gist options
  • Save tomaszwro/b3a6626175c3e17efeb42289ce0b33d7 to your computer and use it in GitHub Desktop.
Save tomaszwro/b3a6626175c3e17efeb42289ce0b33d7 to your computer and use it in GitHub Desktop.
multigit - bash functions to replicate a command on multiple sibling repos
# add to ~/.bash_profile
multigit() { find .. -maxdepth 2 -mindepth 2 -type d -name ".git" -exec dirname {} \; | while read repodir; do echo "-- REPO: $repodir"; git -C $repodir $*; done; }
mgs() { multigit status -s; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment