From 530c743a4b5c82bd09178ce6e0ddfff1fcb9dd6c Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Sat, 19 Jun 2021 17:42:39 +0800 Subject: [PATCH] ... --- cli/fish/functions/git_clone_all.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/fish/functions/git_clone_all.fish b/cli/fish/functions/git_clone_all.fish index c3c38ea..5880ed0 100644 --- a/cli/fish/functions/git_clone_all.fish +++ b/cli/fish/functions/git_clone_all.fish @@ -1,6 +1,8 @@ function git_clone_all - for remote_branch in (git branch -r | awk 'NR>1{print $1}') + for remote_branch in (git branch -r | awk '{print $1}') set local_branch (basename $remote_branch) - git branch --track $local_branch $remote_branch + if not git rev-parse --verify "$local_branch" + git branch --track $local_branch $remote_branch + end end end