From 7a783460e1efb7d5b9cec5162dc06a239a9243b2 Mon Sep 17 00:00:00 2001 From: suchAdemon Date: Wed, 15 Nov 2017 09:14:11 +0100 Subject: [PATCH] git_co_all_branches.sh: init --- git_co_all_branches.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 git_co_all_branches.sh diff --git a/git_co_all_branches.sh b/git_co_all_branches.sh new file mode 100755 index 0000000..199e137 --- /dev/null +++ b/git_co_all_branches.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "============= GIT CO BRANCHES =============" + +for f in $(git br -a | grep remotes | grep -v "remotes/origin/HEAD" | awk '{print $1}' | cut -f3 -d\/) +do + echo "Checkout: ${f}" + git checkout "${f}" --quiet +done + +echo "===========================================" +