Re: Can a git changeset be created with no parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-09-26 at 12:25 -0700, Junio C Hamano wrote:
> Carlos Martín Nieto <cmn@xxxxxxxx> writes:
> 
> > 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/;

Ah, quite.

> 
> > 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.

The manpage mentions that an orphan branch is created. I guess that's
where I got my "orphan commit" name.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]