Subject: Re: Please discuss: what "git push" should do when you do not say what to push?

From: Joey Hess <[email-masked]>
Date: Sat, 17 Mar 2012 10:00:30 -0400

I'd like to point out a use case for the current push behavior
that has probably not been considered. I've written several tools
that store data on subsidiary git branches. 

One is pristine-tar, in which information necessarily to reconstruct
bit-identical tarballs containing the source in (say) master is stored
efficiently in the pristine-tar branch. Another is git-annex, in which
bookeeping information about the actual location of large files is
stored in the git-annex branch. These are not unlike git notes, other
than not being built into git. I'm not the only one doing this, other
examples I know of include several bug trackers (git-case, git-issues,
ticgit).

The current push behavior works well for these subsidiary branches.
But if users have to remember to manually push these branches, which they
do not otherwise manually interact with, they'll forget. I know this
will be confusing, because with current git, users have to be instructed
to push these branches *once*, to get the tracking set up.

I feel that this use of subsidiary branches expands the reach of git;
there are reasons that Fossil is pulling other ancillary data
(bugs, wiki, blog etc) into DVCS. But it makes the mistake, IMHO, of
bundling all that together into one peice of software. Git allows doing
the same things, but loosely coupled, so the best implementation of each
can win.

There might be some way to handle such subsidiary branches while
still changing the push default. If git prints a good enough warning
about other, unpushed matching branches, the user only has to do a
little more work to push them. If a hook was available that could
add branches to the set to be pushed, it could automate pushing
such branches. Or git could get a way to mark one branch as a subsidiary
branch of another, and automatically include subsidiaries in pushes.

-- 
see shy jo