Skip to content

Instantly share code, notes, and snippets.

@renkin
Last active December 16, 2021 00:42
Show Gist options
  • Save renkin/541ee8cc7e433e487337ab5ad4307380 to your computer and use it in GitHub Desktop.
Save renkin/541ee8cc7e433e487337ab5ad4307380 to your computer and use it in GitHub Desktop.
Sometimes you have a folder full of Git repositories and have to update all etc.
#!/bin/bash
# Parameter 1 ist ausgeführter Git Befehl, z.B. pull
find . -maxdepth 1 -type d -path '*/[^\.]*' -not -path '*/target' -not -path '*/src' -printf '\n\n************************\n%p\n************************\n\n' -exec git -C {} fetch --all --tags --prune --progress \; -exec git -C {} status \; -exec git -C {} "$1" \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment