All of lore.kernel.org
 help / color / mirror / Atom feed
* checking out branches: tracking vs. tags
@ 2012-05-24 14:55 jfabernathy
  2012-05-24 15:21 ` Chris Larson
  0 siblings, 1 reply; 5+ messages in thread
From: jfabernathy @ 2012-05-24 14:55 UTC (permalink / raw)
  To: yocto@yoctoproject.org

I'm trying to understand a few git concepts as they relate to Yocto.  
Reading the 1.2 version of the Development Manual Appendix A 
(http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-manual-bsp-appendix), 
I see the statement:

   $ git checkout denzil-7.0 -b denzil


What I think this does is create me a local branch that is fixed to what 
was committed when the denzil-7.0 tag was created and it will remain 
that way and will not track the denzil branch as it gets updated.  Right????

Now if I want to track the denzil branch as changes are committed, I 
think I do the following.

  $ git checkout origin/denzil -b denzil


Now I can do git pull commands to get the updates that are committed. 
Right??

Jim A



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checking out branches: tracking vs. tags
  2012-05-24 14:55 checking out branches: tracking vs. tags jfabernathy
@ 2012-05-24 15:21 ` Chris Larson
  2012-05-24 15:42   ` jfabernathy
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Larson @ 2012-05-24 15:21 UTC (permalink / raw)
  To: jfabernathy; +Cc: yocto@yoctoproject.org

On Thu, May 24, 2012 at 7:55 AM, jfabernathy <jfabernathy@gmail.com> wrote:
> the Development Manual Appendix A
> (http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-manual-bsp-appendix),
> I see the statement:
>
>  $ git checkout denzil-7.0 -b denzil
>
>
> What I think this does is create me a local branch that is fixed to what was
> committed when the denzil-7.0 tag was created and it will remain that way
> and will not track the denzil branch as it gets updated.  Right????
>
> Now if I want to track the denzil branch as changes are committed, I think I
> do the following.
>
>  $ git checkout origin/denzil -b denzil
>
>
> Now I can do git pull commands to get the updates that are committed.
> Right??

Your arguments are backwards. See git help checkout.
-- 
Christopher Larson


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checking out branches: tracking vs. tags
  2012-05-24 15:21 ` Chris Larson
@ 2012-05-24 15:42   ` jfabernathy
  2012-05-24 16:32     ` Chris Larson
  0 siblings, 1 reply; 5+ messages in thread
From: jfabernathy @ 2012-05-24 15:42 UTC (permalink / raw)
  To: Chris Larson; +Cc: yocto@yoctoproject.org

On 05/24/2012 11:21 AM, Chris Larson wrote:
> On Thu, May 24, 2012 at 7:55 AM, jfabernathy<jfabernathy@gmail.com>  wrote:
>> the Development Manual Appendix A
>> (http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-manual-bsp-appendix),
>> I see the statement:
>>
>>   $ git checkout denzil-7.0 -b denzil
>>
>>
>> What I think this does is create me a local branch that is fixed to what was
>> committed when the denzil-7.0 tag was created and it will remain that way
>> and will not track the denzil branch as it gets updated.  Right????
>>
>> Now if I want to track the denzil branch as changes are committed, I think I
>> do the following.
>>
>>   $ git checkout origin/denzil -b denzil
>>
>>
>> Now I can do git pull commands to get the updates that are committed.
>> Right??
> Your arguments are backwards. See git help checkout.
I looked at git help and man git, but it is still unclear because if I 
do the first one where I checkout using the tag, I cannot git pull at 
all; I get an error, about not enough information to merge.  However, if 
I use the name of the branch I can now do git pull when changes are 
committed to denzil.  That's why I thought I understood it.  But who knows.

Jim A



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checking out branches: tracking vs. tags
  2012-05-24 15:42   ` jfabernathy
@ 2012-05-24 16:32     ` Chris Larson
  2012-05-24 17:00       ` Mihai Lindner
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Larson @ 2012-05-24 16:32 UTC (permalink / raw)
  To: jfabernathy; +Cc: yocto@yoctoproject.org

On Thu, May 24, 2012 at 8:42 AM, jfabernathy <jfabernathy@gmail.com> wrote:
> On 05/24/2012 11:21 AM, Chris Larson wrote:
>>
>> On Thu, May 24, 2012 at 7:55 AM, jfabernathy<jfabernathy@gmail.com>
>>  wrote:
>>>
>>> the Development Manual Appendix A
>>>
>>> (http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-manual-bsp-appendix),
>>> I see the statement:
>>>
>>>  $ git checkout denzil-7.0 -b denzil
>>>
>>>
>>> What I think this does is create me a local branch that is fixed to what
>>> was
>>> committed when the denzil-7.0 tag was created and it will remain that way
>>> and will not track the denzil branch as it gets updated.  Right????
>>>
>>> Now if I want to track the denzil branch as changes are committed, I
>>> think I
>>> do the following.
>>>
>>>  $ git checkout origin/denzil -b denzil
>>>
>>>
>>> Now I can do git pull commands to get the updates that are committed.
>>> Right??
>>
>> Your arguments are backwards. See git help checkout.
>
> I looked at git help and man git, but it is still unclear because if I do
> the first one where I checkout using the tag, I cannot git pull at all; I
> get an error, about not enough information to merge.  However, if I use the
> name of the branch I can now do git pull when changes are committed to
> denzil.  That's why I thought I understood it.  But who knows.

You're right, my mistake. Those commands are fine, and your
understanding is largely correct. I highly recommend reading Pro Git
for further information.
-- 
Christopher Larson


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: checking out branches: tracking vs. tags
  2012-05-24 16:32     ` Chris Larson
@ 2012-05-24 17:00       ` Mihai Lindner
  0 siblings, 0 replies; 5+ messages in thread
From: Mihai Lindner @ 2012-05-24 17:00 UTC (permalink / raw)
  To: yocto

On 05/24/2012 07:32 PM, Chris Larson wrote:
> On Thu, May 24, 2012 at 8:42 AM, jfabernathy<jfabernathy@gmail.com>  wrote:
>> On 05/24/2012 11:21 AM, Chris Larson wrote:
>>>
>>> On Thu, May 24, 2012 at 7:55 AM, jfabernathy<jfabernathy@gmail.com>
>>>   wrote:
>>>>
>>>> the Development Manual Appendix A
>>>>
>>>> (http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#dev-manual-bsp-appendix),
>>>> I see the statement:
>>>>
>>>>   $ git checkout denzil-7.0 -b denzil
>>>>
>>>>
>>>> What I think this does is create me a local branch that is fixed to what
>>>> was
>>>> committed when the denzil-7.0 tag was created and it will remain that way
>>>> and will not track the denzil branch as it gets updated.  Right????
>>>>
>>>> Now if I want to track the denzil branch as changes are committed, I
>>>> think I
>>>> do the following.
>>>>
>>>>   $ git checkout origin/denzil -b denzil
>>>>
>>>>
>>>> Now I can do git pull commands to get the updates that are committed.
>>>> Right??
>>>
>>> Your arguments are backwards. See git help checkout.
>>
>> I looked at git help and man git, but it is still unclear because if I do
>> the first one where I checkout using the tag, I cannot git pull at all; I
>> get an error, about not enough information to merge.  However, if I use the
>> name of the branch I can now do git pull when changes are committed to
>> denzil.  That's why I thought I understood it.  But who knows.
>
> You're right, my mistake. Those commands are fine, and your
> understanding is largely correct. I highly recommend reading Pro Git
> for further information.

If you checkout the tag you get the source as it was when the tag was made, without being able to pull, as there's nothing new to be pulled (in detached head state, that's why you get an error). You may see it as a snapshot of the repository.
If you checkout the branch, you'll pull commits brought to that remote branch.
Bye,
-- 
Mihai Lindner


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-24 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-24 14:55 checking out branches: tracking vs. tags jfabernathy
2012-05-24 15:21 ` Chris Larson
2012-05-24 15:42   ` jfabernathy
2012-05-24 16:32     ` Chris Larson
2012-05-24 17:00       ` Mihai Lindner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.