From 5d8f3a44789677f9d5f8f894ac75efe5d4eef7bd Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 15 Aug 2018 21:07:26 +0900 Subject: [PATCH] Prune all dead branches, not only those from the 'origin'. Signed-off-by: Michele Calgaro --- switch_all_submodules_to_head_and_clean | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/switch_all_submodules_to_head_and_clean b/switch_all_submodules_to_head_and_clean index c3fbde6..2af1d91 100755 --- a/switch_all_submodules_to_head_and_clean +++ b/switch_all_submodules_to_head_and_clean @@ -72,7 +72,9 @@ updateModule() { git reset --hard HEAD git clean -dxff fi - git remote prune origin + for _remote in `git remote`; do + git remote prune $_remote + done if [[ -e $PARENTDIR/$MODULE.gitmodules ]]; then if [[ $gituser == "anonymous" ]]; then