-# # 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"
+ # this code is now doing what i have to do when i repair the repo. and it seems to be good so far.
+ # note that we allow the local branch to be merged with its remote counterpart; otherwise we would
+ # miss changes that happened elsewhere which should be seen in our local copy.
+ local branch_list=$(all_branch_names)
+ local bran
+ for bran in $branch_list; do
+ log_feisty_meow_event "synchronizing remote branch: $bran"
+ git checkout "$bran" | $TO_SPLITTER
+ promote_pipe_return 0
+ exit_on_error "git switching checkout to remote branch: $bran"
+
+ show_branch_conditionally "$this_branch"
+
+ 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 --tags origin "$bran" | $TO_SPLITTER
+ promote_pipe_return 0
+ fi
+ exit_on_error "git pull of remote branch: $bran"
+ done
+ # now switch back to our branch.
+ git checkout "$this_branch" | $TO_SPLITTER
+ promote_pipe_return 0
+ exit_on_error "git checking out our current branch: $this_branch"
+
+ # now pull down any changes in our own origin in the repo, to stay in synch
+ # with any changes from others.
+ git fetch --tags --all | $TO_SPLITTER
+#is the above really important when we did this branch already in the loop?
+#it does an --all, but is that effective or different? should we be doing that in above loop?
+ promote_pipe_return 0
+ exit_on_error "git pulling all upstream"