Re: is there a way to reference the branch point?

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

 



Heya,

On Fri, Jan 29, 2010 at 23:29, layer <layer@xxxxxxxxx> wrote:
> If I make a branch `foo' off master, commit a bunch of times, is there
> a way to reference the place on master from which I branched?

Depends, if you make a new branch from master, you can use 'git merge-base', so:

$ # on master
$ git checkout -b foo-topic-branch
$ # work work
$ git commit
$ # work work
$ git commit

Now you want to know where you branches off from master:

$ git merge-base foo-topic-branch master

That will show you the commit you branches off from, even if master
has grown new commits since then.

-- 
Cheers,

Sverre Rabbelier
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]