From 8f0bf4af9dd9a95cae4103177fa2c829b79cde09 Mon Sep 17 00:00:00 2001 From: hidekuro Date: Mon, 17 May 2021 17:44:02 +0900 Subject: [PATCH] git: Use `update` instead of `foreach` in alias 'gSu' Modern `git` can use `submodule` option `update` instead of `foreach` to achieve approximately similar outcome. To allows call without assuming that all submodules will have default branch as `master`, the preferred approach would be to call `git submodule update --remote --recursive` after registering the correct branch for submodule in `.gitmodules`: ``` git config -f .gitmodules submodule..branch ``` For more discussion, see: https://stackoverflow.com/a/33835815 Signed-off-by: Indrajit Raychaudhuri --- modules/git/alias.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index f9d4b14..f14cca5 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -252,7 +252,7 @@ if ! zstyle -t ':prezto:module:git:alias' skip; then alias gSl='git submodule status' alias gSm='git-submodule-move' alias gSs='git submodule sync' - alias gSu='git submodule foreach git pull origin master' + alias gSu='git submodule update --remote --recursive' alias gSx='git-submodule-remove' # Tag (t)