From: Marc Branchaud <marcnarc@xiplink.com>
To: Bill Lear <rael@zopyra.com>
Cc: Andreas Ericsson <ae@op5.se>, Samuel Tardieu <sam@rfc1149.net>,
git@vger.kernel.org
Subject: Re: Using the --track option when creating a branch
Date: Thu, 30 Oct 2008 15:13:52 -0400 [thread overview]
Message-ID: <490A0770.5060600@xiplink.com> (raw)
In-Reply-To: <18697.54743.601331.133842@lisa.zopyra.com>
Bill Lear wrote:
>
> the reason being that every manual our users read says "use git push",
> use "git pull", the examples being written for 'master' branch usage,
> and people just assume that 'git push'/'git pull' are smart enough to
> know which branch you are on and do the same logical thing as a bare
> 'git push'/'git pull' does when on master.
I agree that this is a 'gotcha' for git-push. I'm a new git user, and
I've been experimenting with git and reading the documentation for the
last few weeks. But I would not have known about this behavior if it
weren't for this thread.
Yes, push's man page is clear about what happens if you push with no
refspec, and the fetch & pull man pages both have an obscure note to
"never do your own development on branches that appear
on the right hand side of a <refspec> colon on 'Pull:' lines". But
still the behavior is not what I expected. Before I read this thread, I
missed the implications of what those parts of the man pages were saying.
One could call this a failure of the documentation (man pages and
beyond). Personally, though, I tend to expect minimal commands to do
minimal things. So a plain "git push" would do the minimum amount of
pushing, and if I want it to do more I'd add extra parameters to the
command.
The current behavior seems fairly harmless if you always follow the
pattern of creating topic branches for all your work. But git (rightly)
doesn't enforce that pattern, and so I think push shouldn't default to
doing something potentially harmful just because you forgot to create a
topic branch one day. (Or maybe you decided to be clever and give one
of your local branches the same name as a remote's branch...)
Marc
next prev parent reply other threads:[~2008-10-30 19:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 15:23 Using the --track option when creating a branch Bill Lear
2008-10-29 16:25 ` Santi Béjar
2008-10-29 20:33 ` Bill Lear
2008-10-30 5:12 ` Sam Vilain
2008-10-30 12:04 ` Bill Lear
2008-10-30 12:12 ` Bill Lear
2008-10-30 12:25 ` Andreas Ericsson
2008-10-30 13:52 ` Samuel Tardieu
2008-10-30 14:06 ` Andreas Ericsson
2008-10-30 14:23 ` Samuel Tardieu
2008-10-30 14:41 ` Pierre Habouzit
2008-10-30 14:56 ` Samuel Tardieu
2008-10-30 18:00 ` Sam Vilain
2008-10-30 14:54 ` Andreas Ericsson
2008-10-30 15:04 ` Samuel Tardieu
2008-10-30 15:25 ` Andreas Ericsson
2008-10-30 15:42 ` Bill Lear
2008-10-30 19:13 ` Marc Branchaud [this message]
2008-10-30 17:57 ` Sam Vilain
2008-10-30 23:24 ` Jakub Narebski
2008-11-02 4:23 ` Jeff King
2008-10-30 16:44 ` Sam Vilain
2008-10-30 12:41 ` Santi Béjar
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=490A0770.5060600@xiplink.com \
--to=marcnarc@xiplink.com \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.com \
--cc=sam@rfc1149.net \
/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).