Skip to content

Instantly share code, notes, and snippets.

@jimmyhoran
Created July 9, 2021 02:12
Show Gist options
  • Save jimmyhoran/bc33c1f8cd0602a2981b65fe10c45f9d to your computer and use it in GitHub Desktop.
Save jimmyhoran/bc33c1f8cd0602a2981b65fe10c45f9d to your computer and use it in GitHub Desktop.
Loop through all repositories of a given directory and `git pull` the latest changes.
#!/bin/sh
#
# pull-all-repos.sh
set -euo pipefail
for d in */; do cd $d; git stash; (git pull &); cd ..; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment