Skip to content

Instantly share code, notes, and snippets.

@anavarre
Last active October 28, 2018 13:24
Show Gist options
  • Save anavarre/7171802 to your computer and use it in GitHub Desktop.
Save anavarre/7171802 to your computer and use it in GitHub Desktop.
Update all your GitHub repos automatically. Could work for anything you wish (Bitbucket repos, Drupal repos...)
#!/bin/bash
REPO_PATH="/path/to/github/repos"
GITHUB="repo1 repo2 repo3"
echo "Updating GitHub repos..."
for REPO in ${GITHUB} ; do
cd ${REPO_PATH}/${REPO}/
echo -e "\tPulling ${REPO} repo..."
git pull -q
done
echo "Finished updating all GitHub repos!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment