Skip to content

Instantly share code, notes, and snippets.

@Thesharing
Created April 11, 2019 14:04
Show Gist options
  • Select an option

  • Save Thesharing/bcb6265d1a08397123e1769e74e149d4 to your computer and use it in GitHub Desktop.

Select an option

Save Thesharing/bcb6265d1a08397123e1769e74e149d4 to your computer and use it in GitHub Desktop.
Clone and update all the forked repositories
ORG=Awesome-Interview
curl -s https://api.github.com/orgs/$ORG/repos?per_page=200 | jq .[].clone_url | xargs -n 1 git clone
for REPO in *
do
cd $REPO
curl -s https://api.github.com/repos/$ORG/$REPO | jq .parent.clone_url | xargs -n 1 git remote add upstream
git fetch upstream
git checkout master
git merge upstream/master
git push
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment