The thing is, if you have 200 local branches (because you
interact with 50 repositories with 4 primary branches each), you
do not constantly check all of them out anyway. And the only
place that staleness of the local tracking fork matters is when
you check it out (that is, as long as you train your users that
the way to check differences with the upstream 'pu' in your case
is by doing operations with 'origin/pu' not with your local
'foo').
With that in mind, how about making "git checkout foo", after
foo is set up thusly, to show:
git log --pretty=oneline --left-right origin/pu...foo
if (and only if) they have diverged? Then you can deal with the
staleness of local tracking fork 'foo' in any way you want.
You could even go one step further and make this "checkout foo",
in addition to or instead of showing the above left-right log,
- automatically run "git merge origin/pu" if it is a
fast-forward, and say it did _not_ run that merge if it is
not a fast-forward;
- automatically run "git merge origin/pu" always, even if it is
not a fast-forward;
- automatically run "git rebase origin/pu" always;
Would that make your life easier?
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html