On 2012-04-06 01:00, Jeff King wrote:
On the other hand, one thing we have not talked about is how one gets
into the "topic push fast-forwards master" situation. Which is running:
$ git checkout -b topic origin/master
That's what I was starting to think myself. This whole discussion about
"current" is that it may not a good choice because "push" will not
behave like "pull". But I believe the real problem is that _pull_
doesn't behave like _push_.
In other word, maybe "git checkout -b topic origin/master" shouldn't
create a tracking branch in the first place (unless one uses "--track"
or that some config setting has been explicitly set).
Or more precisely, I believe it should be create a tracking branch only
if the local branch name is the same as the remote's branch.
(And the same for "git branch <local> origin/<remote>" of course)
How many newbies/clueless people will think that a branch "topic" tracks
a branch "origin/master"? And how many of these same people will think
that a branch "topic" doesn't track a branch "origin/topic"? For that
matter, that's how I use git myself. And until it's easy to see what
branch tracks what (i.e. until "git branch" shows the tracking
branches), I don't want to think differently because it's just too risky.
So for the "me too" votes:
- +1 to change change "push.default" to current
- +1 to change "git checkout -b" to not create a tracking branch unless
the local name matches the remote name .
--
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