git-scripts/git_co_all_branches.sh

13 lines
285 B
Bash
Executable File

#!/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 "==========================================="