From: Liu Yubao <yubao.liu@gmail.com>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Do most people feel tracking branches useful?
Date: Wed, 29 Oct 2008 18:38:37 +0800 [thread overview]
Message-ID: <49083D2D.4020202@gmail.com> (raw)
In-Reply-To: <20081029100313.GP3612@atjola.homenet>
Björn Steinbrink wrote:
> On 2008.10.29 16:55:48 +0800, Liu Yubao wrote:
>> Hi,
>>
>> I often feel tracking branches are useless to me, because there are remote
>> branches and I work on my private branch in most time.
>>
>> repos
>> |
>> |-- my (private branch, do my dirty work)
>> |-- master (tracking branch)
>> |-- origin/master (remote branch)
>
> Actually, origin/master is the "[remote] tracking branch". master is
> just a branch that has config settings for "git pull" defaults. ;-)
>
> "Remote branches" are the actual branches on a remote repository.
>
Oh, I'm misguided by the --track option, thank you for clarifying it!
> In your case, you probably want:
> git checkout -b my-stuff origin/master
> git config branch.my-stuff.rebase true
>
> and then you can do:
> git pull
>
> Instead of:
> git fetch origin
> git rebase origin/master
>
> You can also setup branch.autosetuprebase, to automatically get the
> rebase setup, so you can skip the call to "git config" above.
A new config setting, git amazes me again @_@
It's great, thanks!
>
> And you can just delete the "master" branch if you don't use it. There's
> nothing that forces you to keep any branches around that you don't use.
> But that doesn't affect the usefulness of tracking branches or branches
> that have "git pull" defaults :-)
>
>> BTW: I feel the terminalogy "remote branch" is confused, because I must
>> synchronize it with `git fetch`. I feel it's better to call it "tracking
>> branch" // seems will lead to bigger confusion to experienced git users:-(
>
> See above, that's already the case ;-)
>
Got it, --rebase and config.<branch>.rebase and config.autosetuprebase, thank
you again:-)
> Björn
>
prev parent reply other threads:[~2008-10-29 10:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 8:55 Do most people feel tracking branches useful? Liu Yubao
2008-10-29 9:08 ` Miles Bader
2008-10-29 9:58 ` Liu Yubao
2008-10-29 13:29 ` Miles Bader
2008-10-29 9:48 ` Andreas Ericsson
2008-10-29 10:22 ` Liu Yubao
2008-10-29 11:53 ` Andreas Ericsson
2008-10-29 10:03 ` Björn Steinbrink
2008-10-29 10:38 ` Liu Yubao [this message]
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=49083D2D.4020202@gmail.com \
--to=yubao.liu@gmail.com \
--cc=B.Steinbrink@gmx.de \
--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).