Created
February 24, 2014 05:03
-
-
Save anaynayak/9182211 to your computer and use it in GitHub Desktop.
A 'git' function that lets you recursively fire the same git command.
This file contains 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
function git { | |
if [ -d .git ]; then | |
/usr/bin/git $* | |
else | |
for dir in $(find . -maxdepth 2 -name ".git"); do | |
cd ${dir%/*} | |
/usr/bin/git $* | |
cd - | |
done | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment