Browse Source

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.<path>.branch <branch>
```

For more discussion, see: https://stackoverflow.com/a/33835815

Signed-off-by: Indrajit Raychaudhuri <irc@indrajit.com>
master
hidekuro 4 years ago committed by Indrajit Raychaudhuri
parent
commit
8f0bf4af9d
  1. 2
      modules/git/alias.zsh

2
modules/git/alias.zsh

@ -252,7 +252,7 @@ if ! zstyle -t ':prezto:module:git:alias' skip; then @@ -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)

Loading…
Cancel
Save