-# # from very helpful page:
-# # https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
-# for remote in $( git branch -r | grep -v -- '->' ); do
-# git branch --track ${remote#origin/} $remote 2>/dev/null
-##hmmm: ignoring errors from these, since they are continual.
-##hmmm: if we could find a way to not try to track with a local branch when there's already one present, that would be swell. it's probably simple.
-# done
-#
-##hmmm: well, one time it failed without the fetch. i hope that's because the fetch is actually needed and not because the whole approach is fubar.
-# git fetch --all 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
-# test_or_die "git fetch"
-#
-# git pull --all 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
-# test_or_die "git pull"
+#appears to be useless; reports no changes when we need to know about remote changes that do exist:
+# check_branch_state "$this_branch"
+# state=$?
+# test_or_continue "branch state check"
+# echo the branch state is $state
+
+ # this code is now doing what i have to do when i repair the repo. and it seems to be good so far.
+ local branch_list=$(all_branch_names)
+ local bran
+ for bran in $branch_list; do
+# echo "synchronizing remote branch: $bran"
+ git checkout "$bran"
+ test_or_die "git switching checkout to remote branch: $bran"
+ remote_branch_info=$(git ls-remote --heads origin $bran 2>/dev/null)
+ if [ ! -z "$remote_branch_info" ]; then
+ # we are pretty sure the remote branch does exist.
+ git pull --no-ff origin "$bran"
+ fi
+ test_or_die "git pull of remote branch: $bran"
+ done
+ # now switch back to our branch.
+ git checkout "$this_branch"
+ test_or_die "git checking out our current branch: $this_branch"