Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: Do most people feel tracking branches useful?

From: Liu Yubao <hidden>
Date: 2016-06-15 22:45:32

Björn Steinbrink wrote:
On 2008.10.29 16:55:48 +0800, Liu Yubao wrote:
quoted
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 :-)
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help