git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Ulrik Sverdrup <ulrik.sverdrup@gmail.com>
Cc: git@vger.kernel.org, Wincent Colaiuta <win@wincent.com>,
	Junio C Hamano <gitster@pobox.com>,
	Pedro Melo <melo@simplicidade.org>
Subject: Re: Parent-less branches
Date: Fri, 02 May 2008 17:17:43 -0700 (PDT)	[thread overview]
Message-ID: <m38wys6y1q.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080502232008.GA20092@ulrik-ibook>

Ulrik Sverdrup <ulrik.sverdrup@gmail.com> writes:
> Wincent Colaiuta <win@wincent.com> writes:
>>
>> I wanted to do this just the other day, but I did it all inside the  
>> one repo, and made some notes on the process here:
>> 
>> http://rails.wincent.com/wiki/Creating_independent_branches_with_Git
>> 
>> Basically, using "git write-tree" and "git commit-tree" plumbing.
> 
> I think I've seen this done much simpler, in this blog post:
> 
> http://madduck.net/blog/2007.07.11:creating-a-git-branch-without-ancestry/

And it is mentioned in http://git.or.cz/gitwiki/BlogPosts, athough not
yet in either GitTips or GitFaq.


In short the solution is to create content-less branch using:

  $ git symbolic-ref HEAD refs/heads/newbranch
  $ rm .git/index
 
then commit.

> Even though your instructions seem more complicated than they are since
> they mix setting up the parentless branch and preparing the first
> commit content.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-05-03  0:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 23:20 Parent-less branches Ulrik Sverdrup
2008-05-03  0:17 ` Jakub Narebski [this message]
2008-05-03  0:46   ` Sverre Rabbelier
2008-05-04  5:50     ` Daniel Barkalow
  -- strict thread matches above, loose matches on Subject: below --
2008-05-02 21:05 Pedro Melo
2008-05-02 21:47 ` Junio C Hamano
2008-05-02 22:32   ` Wincent Colaiuta
2008-05-02 23:04     ` Pedro Melo
2008-05-02 23:04   ` Pedro Melo
2008-05-02 23:34     ` Randal L. Schwartz
2008-05-03 14:05   ` Johannes Schindelin

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=m38wys6y1q.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=melo@simplicidade.org \
    --cc=ulrik.sverdrup@gmail.com \
    --cc=win@wincent.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).