Skip to content

Instantly share code, notes, and snippets.

@albertlieyingadrian
Created October 2, 2020 01:24
Show Gist options
  • Save albertlieyingadrian/830b20235440f52131010c6f892a901e to your computer and use it in GitHub Desktop.
Save albertlieyingadrian/830b20235440f52131010c6f892a901e to your computer and use it in GitHub Desktop.
Update github master branch for all repos
#!/bin/bash
repos=$(ls -d */)
for repo in $repos; do
echo "Repo name -> $repo"
cd $repo
git stash
git checkout master
git pull origin master
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment