git_co_all_branches.sh: init

This commit is contained in:
Oliver Schraml 2017-11-15 09:14:11 +01:00 committed by suchademon
parent 7a5af97025
commit 7a783460e1
Signed by: oliver.schraml
GPG Key ID: A55864B79D0D0228
1 changed files with 12 additions and 0 deletions

12
git_co_all_branches.sh Executable file
View File

@ -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 "==========================================="