Skip to content

Instantly share code, notes, and snippets.

@carhartl
Created November 2, 2023 14:49
Show Gist options
  • Save carhartl/591f7c4f59fb64699aa09b5f57214986 to your computer and use it in GitHub Desktop.
Save carhartl/591f7c4f59fb64699aa09b5f57214986 to your computer and use it in GitHub Desktop.
Update all git repos within directory
#!/bin/sh
dirs="$(
find . -name .devbox -prune -o -name .terragrunt-cache -prune -o -name lefthook-remotes -prune -o -type d -exec test -d '{}'/.git \; -print
)"
for dir in $dirs; do
cd "$dir" || exit
git config user.email klaus.hartl@test.com
cd -
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment