Last active
October 14, 2024 15:31
-
-
Save AbeEstrada/18ae20e470c92e1abbd924e0548b8152 to your computer and use it in GitHub Desktop.
Git pull from multiple directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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