From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Subject: [RFC] New kind of upstream branch: base branch
Date: Wed, 15 May 2013 15:34:49 -0500 [thread overview]
Message-ID: <CAMP44s3LQ0GN4rrXdpb8Fe0iLeAEm2VjkH6BHK64pmX-xpc7+Q@mail.gmail.com> (raw)
Hi,
I've been using Git from the start, but only lately have I forced
myself to configure upstream branches for all my branches, and I've
found a few things more convenient, but others completely contrary to
what I expected.
Inconvenient:
Before, I used to do 'git fetch' to simply fetch from 'origin', but
now, it depends on where 'upstream' is set to.
Convinient:
Now, I can just do 'git rebase --interactive' and I don't have to
specify the starting point, which is particularily useful when there's
a lot of branches one depending on another.
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'.
== base ==
The 'base' branch will be set each time you create a branch from another;
'git checkout -b foobar master' sets 'master' as the 'base' of 'foobar'.
Then you can do 'git rebase foobar@{base}' or simply 'git rebase', and
Git will pick the right branch to rebase unto, even if you have no
'upstream'
configured.
This way 'git fetch' will keep picking 'origin', and other commands
that make use of 'upstream' would be undisturbed.
If both 'base' and 'upstream' are defined, I think 'git rebase' should
use 'base', but since that would break old behavior, perhaps there
should be a configuration variable to enable a different behavior.
I already started writting the patches, and although tedious, I think
they they'll be rather straightforward, but I thought it would be best
to hear some opinions first.
What do you think?
--
Felipe Contreras
next reply other threads:[~2013-05-15 20:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 20:34 Felipe Contreras [this message]
2013-05-15 22:22 ` [RFC] New kind of upstream branch: base branch 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
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=CAMP44s3LQ0GN4rrXdpb8Fe0iLeAEm2VjkH6BHK64pmX-xpc7+Q@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/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).