From 9a7acb86a0f76f375e7589e73bc5d6a19ab4c686 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Mon, 8 Dec 2025 18:48:26 +0100 Subject: [PATCH] feat(git): merge gitf c with gitf d for branch cleanup after pull --- .bash_aliases | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 0900018..d5e8af4 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -161,17 +161,15 @@ gitf () { gitf ;; - # Clear local branches that have no upstream on remote (cleanup) - "c") - git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D - ;; - # Pull current branch from a remote (defaults to "origin"). "d" for download. "d") local remote="${2:-origin}" git pull "$remote" $(git rev-parse --abbrev-ref HEAD) git submodule update --recursive + + # Delete local branches that used to be tracked on the remote but are now gone (deleted from remote) + git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D ;; # Update all git submodules in this repo. "sd" for submodule download.