From 9615f943c52fe69b199065fa2695295a32bd66a1 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Thu, 11 Sep 2025 12:27:31 +0200 Subject: [PATCH] feat(git): add function for updating git submodules --- .bash_aliases | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bash_aliases b/.bash_aliases index 4a02965..c573b46 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -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}"