-
-
Save MrCitron/21fdccecaa09194a63018ed94ae6c6d4 to your computer and use it in GitHub Desktop.
Git command on all subfolders (gita)
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
#!/bin/bash | |
red="\033[0;31m" | |
NC="\033[0m" # No Color | |
for i in ./* | |
do | |
if [ -d "$i" ] | |
then | |
if [ -d "$i/.git" ] | |
then | |
echo -e "${red}Pulling $i${NC}" | |
cd $i | |
git "$@" | |
cd .. | |
echo | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment