All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Hudec <bulb@ucw.cz>
To: git discussion list <git@vger.kernel.org>
Subject: Re: pushing changes to a remote branch
Date: Wed, 11 Jul 2007 21:29:59 +0200	[thread overview]
Message-ID: <20070711192959.GB3069@efreet.light.src> (raw)
In-Reply-To: <20070710143614.GA29681@piper.oerlikon.madduck.net>

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

On Tue, Jul 10, 2007 at 16:36:14 +0200, martin f krafft wrote:
>   git checkout origin/vim
>     Note: moving to "origin/vim" which isn't a local branch

There is more to that message, no? However, it only says "Head is now at
<commit-id>", which does not really indicate, that the HEAD has been
"detached". This means that it now contains a commit-id rather than name of
some branch.

Git detaches head whenever you check out, without -b option, anything other
than branch (without it's refs/heads prefix). If you than check out a branch,
you can't see the commit on any branch anymore. However, you can still access
it in reflog, ie. via expressions like HEAD@{1} or HEAD@{1 hour ago}.

You should also be able to:

 git push origin HEAD:vim

after the commit, and even (I didn't try it, but documentation seems to claim
it should work):

 git push origin HEAD@{1}:vim

if you already changed HEAD more.

You can see this "metahistory" of HEAD via:

 git reflog

which is shorthand for git reflog show HEAD

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2007-07-11 19:31 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
2007-07-11 19:29 ` Jan Hudec [this message]

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=20070711192959.GB3069@efreet.light.src \
    --to=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.