git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry D'Anna <larry@elder-gods.org>
To: Git Mailing List <git@vger.kernel.org>
Cc: Michael Wookey <michaelwookey@gmail.com>
Subject: Re: creating a new branch without an ancestor
Date: Thu, 4 Feb 2010 22:24:29 -0500	[thread overview]
Message-ID: <20100205032429.GA23285@cthulhu> (raw)
In-Reply-To: <d2e97e801002041919r2043d05cjfb114a466605d9a1@mail.gmail.com>

* Michael Wookey (michaelwookey@gmail.com) [100204 22:20]:
> Maybe I'm missing something from reading the docs, but I couldn't see
> how to create a new branch in an existing repo that has no ancestor. I
> would like to do something like what git.git does with some of the
> other ancillary branches like "man", "html", and "todo".
> 
> I was hoping to do something like "git branch --no-ancestor
> new-branch-name" but didn't see anything in the documentation that
> describes the necessary branch options.
> 
> Or, am I looking in the wrong place?

git symbolic-ref HEAD refs/heads/whatever

That'll leave your index and working tree alone of course, so if you did a
commit right after that it would match the content of your current branch but
not the history.

    --larry

  reply	other threads:[~2010-02-05 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05  3:19 creating a new branch without an ancestor Michael Wookey
2010-02-05  3:24 ` Larry D'Anna [this message]
2010-02-05  3:32   ` Jay Soffian
2010-02-05 18:38 ` Wesley J. Landaker

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=20100205032429.GA23285@cthulhu \
    --to=larry@elder-gods.org \
    --cc=git@vger.kernel.org \
    --cc=michaelwookey@gmail.com \
    /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).