Skip to content

Instantly share code, notes, and snippets.

@robinbowes
Created December 29, 2018 01:38
Show Gist options
  • Save robinbowes/3335a2d464d553c77b58d960d930a12c to your computer and use it in GitHub Desktop.
Save robinbowes/3335a2d464d553c77b58d960d930a12c to your computer and use it in GitHub Desktop.
for repo in ${list_of_repos[*]} ; do
if [[ -d $repo ]]; then
(
cd "$repo"
git checkout master
git pull
)
else
git clone "git@github.com:org/$repo.git"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment