This appears to be a bug in Git 1.8.1.
Skimming the Git source code (specifically remote.c
and builtin/remote.c
), the list under "Local refs configured for 'git push'" is calculated as follows:
- collect configured push refspecs:
- read
.git/remotes/<remotename>
(an obsolete config file; seegit help repository-layout
) - read
.git/branches/<branchname>
(another obsolete config file) - examine the
remote.<remotename>.push
config item
- read
- if step #1 didn't find anything, use
:
as the only push refspec - find all {local, remote} branch combinations that matched the collected push refspecs
Note that the above algorithm doesn't pay attention to branch.<branchname>.remote
, branch.<branchname>.merge
, or push.default
.
Under typical usage patterns, step #1 in the above algorithm will never find any configured refspecs so :
will be used. That refspec is a simple matching refspec, so with typical usage git remote show <remotename>
will always print <branchname> pushes to <branchname>
if there is a branch named <branchname>
in both the local and remote repositories.