Last active
March 15, 2017 14:42
-
-
Save leogdion/7892cd0cbdb9fac8ad092679869e8ae8 to your computer and use it in GitHub Desktop.
git submodule foreach aliases
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
function __git_submodule_foreach_commit () { | |
git submodule foreach "git commit -am $1" && git commit -am $1 | |
} | |
function __git_submodule_foreach_push () { | |
git submodule foreach "git push" && git push | |
} | |
function __git_submodule_foreach_pull () { | |
git submodule foreach "git pull" && git pull | |
} | |
function __git_submodule_foreach_commit_and_push () { | |
__git_submodule_foreach_commit $1 | |
__git_submodule_foreach_push | |
} | |
alias gsFcommit="__git_submodule_foreach_commit" | |
alias gsFpull="__git_submodule_foreach_pull" | |
alias gsFpush="__git_submodule_foreach_push" | |
alias gsFcpush="__git_submodule_foreach_commit_and_push" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment