Created
October 25, 2016 10:36
-
-
Save skew202/63a2b467e63a7f8b3995fe5be5ed99b3 to your computer and use it in GitHub Desktop.
git command over subdirectories
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
# ind . searches the current directory | |
# -type d to find directories, not files | |
# -depth 1 for a maximum depth of one sub-directory | |
# -exec {} \; runs a custom command for every find | |
# git --git-dir={}/.git --work-tree=$PWD/{} pull git pulls the individual directories | |
find . -maxdepth 1 -type d -exec git --git-dir={}/.git --work-tree=$PWD/{} pull \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment