Created
October 18, 2023 13:53
-
-
Save vipero07/9287af445a011656c0bcd2b81133bd58 to your computer and use it in GitHub Desktop.
git all alias for .gitconfig - runs git command on all 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
[alias] | |
all = "!f() { ls -R --directory --color=never */.git | sed 's/\\/.git//' | xargs -P10 -I{} git -C {} $1; }; f" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will make the git alias of
git all
which applies a git command to all sub folders you can follow it with any normal git command e.g.When run in a project directory will pull all the children directories.
All children folders will have
git pull
run inside