From: Jan Hudec <bulb@ucw.cz>
To: Junio C Hamano <gitster@pobox.com>
Cc: Brian Gernhardt <benji@silverinsanity.com>,
Jeff King <peff@peff.net>,
git discussion list <git@vger.kernel.org>
Subject: Re: pushing changes to a remote branch
Date: Sat, 14 Jul 2007 10:38:43 +0200 [thread overview]
Message-ID: <20070714083843.GA3678@efreet.light.src> (raw)
In-Reply-To: <7v1wfe4op5.fsf@assigned-by-dhcp.cox.net>
[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]
On Wed, Jul 11, 2007 at 14:26:14 -0700, Junio C Hamano wrote:
> Jan Hudec <bulb@ucw.cz> writes:
>
> >> $ git checkout origin/master
> >> Note: moving to "origin/master" which isn't a local branch
> >> If you want to create a new branch from this checkout, you may do so
> >> (now or later) by using -b with the checkout command again. Example:
> >> git checkout -b <new_branch_name>
> >> HEAD is now at f4855d4... 1
> >
> > The problem of this warning is, that it does not actually say anything about
> > detached and that potential commit won't update the ref being checked out.
>
> "Being detached" is a rather geekish synonym to "which isn't a
> local branch", isn't it?
In a sense, no, it is not. "Being detached" is a synonym of "HEAD is not
symbolic ref". The current warning does not really convey the information,
that the ref being checked out will not be updated. Maybe it could be
extended along the lines of following patch.
Hm, it will say the same when checking out with commit name, which does not
make sense much, though.
-->8--
Extend the detached head warning in checkout.
The warning when detaching head now explicitely states that ref being checked
out will not be updated.
---
git-checkout.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-checkout.sh b/git-checkout.sh
index 17f4392..502b2be 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -178,7 +178,8 @@ then
detached="$new"
if test -n "$oldbranch" && test -z "$quiet"
then
- detach_warn="Note: moving to \"$new_name\" which isn't a local branch
+ detach_warn="Note: moving to \"$new_name\" which isn't a local branch, so it will
+_not_ be updated by local commits.
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>"
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-07-14 8:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 14:36 pushing changes to a remote branch martin f krafft
2007-07-10 17:34 ` Jeff King
2007-07-10 18:10 ` Brian Gernhardt
2007-07-10 22:04 ` Jeff King
2007-07-11 3:44 ` Sean Kelley
2007-07-11 19:34 ` Jan Hudec
2007-07-11 19:31 ` Jan Hudec
2007-07-11 21:26 ` Junio C Hamano
2007-07-14 8:38 ` Jan Hudec [this message]
2007-07-11 19:29 ` Jan Hudec
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=20070714083843.GA3678@efreet.light.src \
--to=bulb@ucw.cz \
--cc=benji@silverinsanity.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.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).