Skip to content

Instantly share code, notes, and snippets.

@AbeEstrada
Last active October 14, 2024 15:31
Show Gist options
  • Save AbeEstrada/18ae20e470c92e1abbd924e0548b8152 to your computer and use it in GitHub Desktop.
Save AbeEstrada/18ae20e470c92e1abbd924e0548b8152 to your computer and use it in GitHub Desktop.
Git pull from multiple directories
alias multipull='find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do echo "\033[32mUpdating:\033[0m $dir\n$(git -C "$dir" remote get-url origin 2>/dev/null || echo "No remote for $dir")"; git -C "$dir" pull || echo "Failed $dir"; echo; done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment