From a1b2c814e43161401889d7e0abdea2f46c7ed0ef Mon Sep 17 00:00:00 2001 From: kkard2 Date: Fri, 16 Jan 2026 09:26:10 +0100 Subject: better sw --- global_gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'global_gitconfig') diff --git a/global_gitconfig b/global_gitconfig index 26b0065..c61577b 100644 --- a/global_gitconfig +++ b/global_gitconfig @@ -7,7 +7,7 @@ bd = branch -d cb = checkout -b check = checkout - sw = switch + sw = "!f(){ b=$(git for-each-ref --format='%(refname:short)' refs/heads refs/remotes | grep -E '(^|/)'\"$1\" | head -n1); [ -z \"$b\" ] && echo \"No branch matching $1\" && exit 1; git switch \"${b#origin/}\"; }; f" cm = commit -m al = config --get-regexp alias pushup = push --set-upstream origin -- cgit v1.3.1