1
0
Fork 0

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>
pull/1934/head
hidekuro 4 years ago committed by Indrajit Raychaudhuri
parent a3643f124e
commit c4a8f446c6

@ -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