Last active
February 24, 2017 09:36
-
-
Save tomaszwro/b3a6626175c3e17efeb42289ce0b33d7 to your computer and use it in GitHub Desktop.
multigit - bash functions to replicate a command on multiple sibling repos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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