Skip to content

Instantly share code, notes, and snippets.

@olivierperez
Last active September 7, 2017 22:15
Show Gist options
  • Save olivierperez/27cd40c14aa8774d51a630aea21b80fc to your computer and use it in GitHub Desktop.
Save olivierperez/27cd40c14aa8774d51a630aea21b80fc to your computer and use it in GitHub Desktop.
#!/bin/bash
GREEN='\033[0;32m'
BROWN='\033[0;33m'
DARK_GRAY='\033[1;30m'
NC='\033[0m' # No Color
IFS=$'\n'
for folder in `find . -maxdepth 1 -type d ! -name .idea* ! -name gitall ! -path . | sort`
do
cd $folder
if [ -d .git ]
then
echo -e "${GREEN}$folder${NC}"
echo -e "${GREEN}*****************************${NC}"
echo -e "On branch ${BROWN}`git rev-parse --abbrev-ref HEAD`${NC}"
git $@
echo ""
else
echo -e "${DARK_GRAY}$folder${NC}"
echo -e "${DARK_GRAY}*****************************${NC}"
echo -e "${DARK_GRAY}Not a git folder${NC}"
echo ""
fi
cd ..
done
git-r pull
git-r fetch --all --prune
git-r branch
git-r checkout develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment