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 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
| [alias] | |
| all = "!f() { ls -R --directory --color=never */.git | sed 's/\\/.git//' | xargs -P10 -I{} git -C {} $1; }; f" | |
Author
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 allwhich 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.
stateDiagram-v2 State1: Parent Directory note right of State1 Run `git all pull` here end note State1 --> Child State1 --> Child2 State1 --> Child3All children folders will have
git pullrun inside