Last active
October 20, 2021 03:20
-
-
Save jonpugh/5163389 to your computer and use it in GitHub Desktop.
Lots of repos? Try "git-pull-recursive" to run "git pull" on all subfolders with a .git folder inside. Thanks to http://snipplr.com/view/62314/perform-git-pull-on-subdirectory-recursive/
This file contains hidden or 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
# For use in Chef: | |
# Adds a command: git-pull-recursive | |
file "/usr/local/bin/git-pull-recursive" do | |
owner "root" | |
group "root" | |
mode "0755" | |
action :create | |
content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;' | |
end |
This file contains hidden or 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
# For use in a shell: | |
# Download this file to /usr/local/bin/git-pull-recursive, then chmod 755 it to install git-pull-recursive | |
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment