Skip to content

Instantly share code, notes, and snippets.

@jona7o
Last active September 19, 2018 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jona7o/45db3e410a75e89f42f9653bf26c3bbe to your computer and use it in GitHub Desktop.
Save jona7o/45db3e410a75e89f42f9653bf26c3bbe to your computer and use it in GitHub Desktop.
Pull all git repositorys under a base bath
#!/bin/bash
# visit us @ innFactory.de
CUR_DIR=$(pwd)
GREEN='\033[0;32m'
NC='\033[0m'
echo "Pulling latest changes for all repositories..."
echo $CUR_DIR
for g in $(find . -name ".git" | cut -c 3-); do
PROJECTPATH=${g%.*}
echo -e "[${GREEN}X${NC}]" $PROJECTPATH;
cd $PROJECTPATH
git pull
cd $CUR_DIR
done
echo -e "${GREEN}Update completed${NC}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment