Re: Can a git changeset be created with no parent
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 26, 2011, 19:25 UTC
- Message-ID
- <7vaa9r2jii.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1316961212.4388.5.camel@centaur.lab.cmartin.tk>
Carlos Martín Nieto <cmn@elego.de> writes:
Show 9 quoted lines
> On Sun, 2011-09-25 at 07:15 -0700, vra5107 wrote: >> Hi >> >> I am currently in the process of converting a large hg repository. >> One of the changesets has no parents assigned. So to mirror that is it >> possible to create a git changeset that doesnot have a parent ? > > They're called commits in git, and yes it's possible. They are called > orphan commits and it's what you get when you do the first commit in the
Just to set the terminology straight, s/orphan/root/;
> repository. > > You can do this with 'git checkout --orphan somebranch'. Notice that the
The orphan here refers to the fact that the next commit will not be a child of the current commit. The resulting one is a "root" commit.