Paolo Bonzini <bonzini@xxxxxxx> writes: > In order to track and build on top of a branch 'topic' you track from > your upstream repository, you often would end up doing this sequence: > > git checkout -b mytopic origin/topic > git config --add branch.mytopic.remote origin > git config --add branch.mytopic.merge refs/heads/topic > > This would first fork your own 'mytopic' branch from the 'topic' > branch you track from the 'origin' repository; then it would set up two > configuration variables so that 'git pull' without parameters does the > right thing while you are on your own 'mytopic' branch. > > This commit adds a --track option to git-branch, so that "git > branch --track topic origin/topic" performs the latter two actions > when creating your 'topic' branch. Hmm. I think your use of 'mytopic' is very good for the purpose of illustration. It makes clear which configuration takes name from what. So I like your first paragraph. However, one reason people like the separate remote layout is that it allows you to name your own branch identically with that of the other side, so in that sense, the description in your second paragraph matches the real-life usage better. What I am getting at is that (1) these two paragraphs are inconsistent, (2) there is a reason to prefer the description in the first paragraph, and (3) there is another reason to prefer the description in the second one. > By setting configuration variable > 'remote.REMOTENAME.trackintolocalbranches' to true, you do not have to > pass the --track option explicitly (the configuration variable is off > by default, and there is a --no-track option to countermand it even if > the variable is set). As Johannes already pointed this out, I think allowing this to be controlled per remote is nice but overkill. A single boolean configuration, say "branch.autosetupmerge", would suffice. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html