Skip to content

Instantly share code, notes, and snippets.

@MrCitron
Created October 5, 2017 20:06
Show Gist options
  • Save MrCitron/21fdccecaa09194a63018ed94ae6c6d4 to your computer and use it in GitHub Desktop.
Save MrCitron/21fdccecaa09194a63018ed94ae6c6d4 to your computer and use it in GitHub Desktop.
Git command on all subfolders (gita)
#!/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