Junio C Hamano <gits...@pobox.com> writes:

> If you are really doing your own development, then you would have
> some topic branches of your own, with forks of some (but most likely
> not all, especiallyi when there are many branches at the upstream)
> branches you got from the upstream, and "git branch --list" that
> shows only your own and what you are interested in (i.e. those that
> you actually bothered to "git checkout <branchname>") without
> showing random other branches that exist at the remote but do not
> interest you is a feature.  Your hypothetical "clone" that
> indiscriminatedly forks all branches at remote locally will destroy
> the usefulness of it.

Related to this, a feature I have long thought we wished to have is
complete opposite of this.  After creating and working on a local
topic branch and then concluding the work on it, a user would "git
push" the branch out to a remote, and then check out a different
branch (e.g. the 'master' branch).  I wish we had a mode that would
automatically *delete* the local topic branch that has already been
pushed out (and more importantly, a branch that I have *done* with,
at least for now), to unclutter my local branch namespace.  When I
want to further work on it, I can ask "git checkout" to dwim to
recreate one on demand.

Of course, there are some wrinkles due to pesky impleemntation
details (e.g. the "autonuke-and-recreate" would lose reflog), but I
do not think it is fundamental hurdle.


Reply via email to