Last active
September 7, 2017 22:15
-
-
Save olivierperez/27cd40c14aa8774d51a630aea21b80fc to your computer and use it in GitHub Desktop.
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 | |
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 |
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
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