git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Bracey <kevin@bracey.fi>
To: Junio C Hamano <gitster@pobox.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>, git@vger.kernel.org
Subject: Re: [RFC] New kind of upstream branch: base branch
Date: Sat, 18 May 2013 17:29:57 +0300	[thread overview]
Message-ID: <51979065.4060609@bracey.fi> (raw)
In-Reply-To: <7va9ntxu3w.fsf@alter.siamese.dyndns.org>

On 17/05/2013 22:51, Junio C Hamano wrote:
> Kevin Bracey <kevin@bracey.fi> writes:
>
>> On 15/05/2013 23:34, Felipe Contreras wrote:
>>>    I think I'm using 'upstream' for something it was not intended to,
>>> and
>>> I think the current 'upstream' behavior should be split into
>>> 'upstream' and 'base'.
>>>
>> I found myself thinking the same thing. It's really convenient being
>> able to set your topic branch's upstream to another local branch, so
> What is that "another local branch"? ...  And if that is your workflow, setting
> push.default to "current" (and setting remote.pushdefault to your
> publishing repository) should be a sufficient interim solution, and
> you do not need to set branch.$name.push to each and every branch
> you intend to push out, I think.

I agree that using "push.default current" covers some cases - I hadn't 
really considered it - tended to just stick with "upstream". "current" 
nearly does the job, but I will sometimes be wanting different names.

What I'll often be doing is creating a topic branch based on master or 
origin/master. (I would hardly ever be updating master or pushing to 
origin/master myself, so I probably should be just doing origin/master, 
but I tend to create a local master just to save typing on all those 
"git rebase origin/master").

During work, to give others visibility, and the possibility to tinker 
with the topic branch during development (as we don't have full 
inter-site sharing of work areas), I would push the topic branch up to 
the central "origin" server, often with a "kbracey/" prefix, partially 
for namespacing, and partially to indicate it's currently "private" work 
and subject to rebasing.  I guess I could create the topic branch as 
"kbracey/topic" locally, but I'd rather not have to.

So I'd like "git rebase (-i)" to move my topic branch up 
(origin/)master. And I'd like "git push (-f)" to send it to 
"origin/kbracey/topic". And by extension, I suppose "git pull --rebase" 
to update origin/master and rebase. (Although I'm not much of a puller - 
I tend to fetch then rebase manually).

The final releasing procedure for the topic branch would be to hand that 
branch over to an integrator, who would then merge/rebase it into master.

And it would be ideal if the initial base and push tracking information 
could be set up automatically on the first "git checkout -b"/"git 
branch" and "git push". (For one, I've always found it odd that there's 
an asymmetry - if you check out a topic branch from the server to work 
on or use it, you get a local copy with upstream set by default. But if 
you create a topic branch yourself then push it, the upstream isn't set 
by default - you need the -u flag. This seems odd to me, and I've seen 
others confused by this).

Kevin

  parent reply	other threads:[~2013-05-18 14:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 20:34 [RFC] New kind of upstream branch: base branch Felipe Contreras
2013-05-15 22:22 ` Philip Oakley
2013-05-16  3:46   ` Felipe Contreras
2013-05-16 19:35     ` Philip Oakley
2013-05-17  0:07       ` Felipe Contreras
2013-05-17 19:20 ` Kevin Bracey
2013-05-17 19:51   ` Junio C Hamano
2013-05-17 20:15     ` Felipe Contreras
2013-05-18 14:29     ` Kevin Bracey [this message]
2013-05-18 18:14       ` Ramkumar Ramachandra
2013-05-18 22:42       ` Felipe Contreras
2013-05-19  6:22       ` Junio C Hamano
2013-05-19  8:12         ` Felipe Contreras
2013-05-17 20:01   ` Felipe Contreras
  -- strict thread matches above, loose matches on Subject: below --
2013-05-15 20:28 Felipe Contreras
2013-05-15 22:20 ` Junio C Hamano
2013-05-15 22:50   ` Junio C Hamano
2013-05-15 23:18     ` Felipe Contreras
2013-05-15 22:56   ` Felipe Contreras
2013-05-15 23:14     ` Junio C Hamano
2013-05-15 23:32       ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51979065.4060609@bracey.fi \
    --to=kevin@bracey.fi \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).