From 574e0896a6c98781a00b113b66ce7b52131f0b61 Mon Sep 17 00:00:00 2001 From: suchAdemon Date: Thu, 1 Feb 2018 17:16:14 +0100 Subject: [PATCH] git_update_all_branches.sh: init --- git_update_all_branches.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 git_update_all_branches.sh diff --git a/git_update_all_branches.sh b/git_update_all_branches.sh new file mode 100755 index 0000000..a6156c4 --- /dev/null +++ b/git_update_all_branches.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "============= GIT UPDATE BRANCHES =============" + +for f in $(git br -a | grep remotes | grep -v "remotes/origin/HEAD" | awk '{print $1}' | cut -f3 -d\/) +do + echo "Updateing: ${f}" + git checkout "${f}" --quiet && git pull origin "${f}" --quiet +done + +echo "===========================================" +