mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2025-09-13 19:03:40 +02:00
feat(git): add function for updating git submodules (#33)
Reviewed-on: https://codeberg.org/vlw/dotfiles/pulls/33
This commit is contained in:
parent
d1432cb07f
commit
c931dd9cf7
1 changed files with 6 additions and 0 deletions
|
@ -95,6 +95,12 @@ gitf () {
|
|||
git pull "$remote" $(git rev-parse --abbrev-ref HEAD)
|
||||
;;
|
||||
|
||||
# Update all git submodules in this repo. "sd" for submodule download.
|
||||
"sd")
|
||||
# Only supports "master" as branch for now. This could cause unexpected results if a tracked submodule has a different branch or location name
|
||||
git submodule foreach "(git checkout master; git pull)"
|
||||
;;
|
||||
|
||||
# Push commited changes (current branch) to a remote (defaults to "origin"). "u" for upload.
|
||||
"u")
|
||||
local remote="${2:-origin}"
|
||||
|
|
Loading…
Add table
Reference in a new issue