public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* GIT again
@ 2011-01-07 15:13 Piotr Hosowicz
  2011-01-07 15:43 ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Hosowicz @ 2011-01-07 15:13 UTC (permalink / raw)
  To: LKML

Hello,

Sorry for bothering again. I think I fimanaged to build the kernel as I 
wanted to. Lets simplify the problem. There is Linus tree and a separate 
tree, which was announed here as:

git://git.kernel.org/some.git for-linus

The objective is to build the kernel with Linus sources with some.git 
changes incorporatwed in it. I think I managed to achieve the objective 
doing:

# let me remind myself ;-)
git clone <Linus URL here>
git remote add some git://git.kernel.org/some.git
git pull some for-linus

I've done it this way and I am convinced I've achieved the objective. 
But not sure. For sure the last command modified the source, what is 
what I wanted, I had to finally correct ot by hand and do git commit -a.

Am I right?

Regards,

Piotr Hosowicz

-- 
- Poszedłem wczoraj z żoną do ZOO
- I jak?
- Nie wzięli...
NP: Peter Green Splinter Group - Turn Your Love Away
NB: 2.6.37-20110107-1437-pztidm+

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

* Re: GIT again
  2011-01-07 15:13 GIT again Piotr Hosowicz
@ 2011-01-07 15:43 ` Michal Hocko
  2011-01-07 16:07   ` Piotr Hosowicz
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2011-01-07 15:43 UTC (permalink / raw)
  To: Piotr Hosowicz; +Cc: LKML

On Fri 07-01-11 16:13:00, Piotr Hosowicz wrote:
> Hello,
> 
> Sorry for bothering again. I think I fimanaged to build the kernel
> as I wanted to. Lets simplify the problem. There is Linus tree and a
> separate tree, which was announed here as:
> 
> git://git.kernel.org/some.git for-linus
> 
> The objective is to build the kernel with Linus sources with
> some.git changes incorporatwed in it. I think I managed to achieve
> the objective doing:
> 
> # let me remind myself ;-)
> git clone <Linus URL here>
> git remote add some git://git.kernel.org/some.git
> git pull some for-linus

Yes, this will merge some/for-linus branch into the current branch which
is master (from the above sequence of commands).
 
> I've done it this way and I am convinced I've achieved the
> objective. But not sure. 

git pull is essentially the same thing as git fetch and git merge. The
first command fetches all commits from the remote and the second one
will merge your current tree with the given branch (it doesn't care much
about the fact those commits come from a remote repository as those
objects are available locally after fetch)

> For sure the last command modified the
> source, what is what I wanted, I had to finally correct ot by hand
> and do git commit -a.

This is because you could end up with some conflicts after merge.
Anyway, git commit -a is not the best way to do this in general. I would
encourage you to use git status to get an overview of what has changed
(what is the conflict etc...) and selectively git add only those changes
that are relevant and then git commit after you are done.

Btw. the way you did this is not very much optimal. You have merged
something into your _master_ branch which means that when-ever you want
to pull again from linus you will have to merge again. In general I tend
to keep the _master_ branch without any modifications and do all my
changes (merges with other external sources etc.) in dedicated branches
so that I can keep following linus master without any modifications.

> 
> Am I right?
> 
> Regards,
> 
> Piotr Hosowicz
> 
> -- 
> - Poszed?em wczoraj z ?on? do ZOO
> - I jak?
> - Nie wzi?li...
> NP: Peter Green Splinter Group - Turn Your Love Away
> NB: 2.6.37-20110107-1437-pztidm+
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Michal Hocko
L3 team 
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

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

* Re: GIT again
  2011-01-07 15:43 ` Michal Hocko
@ 2011-01-07 16:07   ` Piotr Hosowicz
  0 siblings, 0 replies; 3+ messages in thread
From: Piotr Hosowicz @ 2011-01-07 16:07 UTC (permalink / raw)
  To: Michal Hocko; +Cc: LKML

On 07.01.2011 16:43, Michal Hocko wrote:
> On Fri 07-01-11 16:13:00, Piotr Hosowicz wrote:
>> Hello,
>>
>> Sorry for bothering again. I think I fimanaged to build the kernel
>> as I wanted to. Lets simplify the problem. There is Linus tree and a
>> separate tree, which was announed here as:
>>
>> git://git.kernel.org/some.git for-linus
>>
>> The objective is to build the kernel with Linus sources with
>> some.git changes incorporatwed in it. I think I managed to achieve
>> the objective doing:
>>
>> # let me remind myself ;-)
>> git clone<Linus URL here>
>> git remote add some git://git.kernel.org/some.git
>> git pull some for-linus
>
> Yes, this will merge some/for-linus branch into the current branch which
> is master (from the above sequence of commands).

Thanks.

>> I've done it this way and I am convinced I've achieved the
>> objective. But not sure.
>
> git pull is essentially the same thing as git fetch and git merge. The
> first command fetches all commits from the remote and the second one
> will merge your current tree with the given branch (it doesn't care much
> about the fact those commits come from a remote repository as those
> objects are available locally after fetch)

Thanks.

>> For sure the last command modified the
>> source, what is what I wanted, I had to finally correct ot by hand
>> and do git commit -a.
>
> This is because you could end up with some conflicts after merge.
> Anyway, git commit -a is not the best way to do this in general. I would
> encourage you to use git status to get an overview of what has changed
> (what is the conflict etc...) and selectively git add only those changes
> that are relevant and then git commit after you are done.

I thought so. Thanks.

> Btw. the way you did this is not very much optimal. You have merged
> something into your _master_ branch which means that when-ever you want
> to pull again from linus you will have to merge again. In general I tend
> to keep the _master_ branch without any modifications and do all my
> changes (merges with other external sources etc.) in dedicated branches
> so that I can keep following linus master without any modifications.

That is a future stage to some. Now I am happy and proud I have what I 
wanted.

Thanks, regards,

Piotr Hosowicz

-- 
<Nub> Może mi ktoś wytłumaczyć, jak dzielą sie komórki?
<Tolek> o
<Tolek> O
<Tolek> 8
<Tolek> o o
NP: Peter Green Splinter Group - Burglar
NB: 2.6.37-20110107-1437-pztidm+

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

end of thread, other threads:[~2011-01-07 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 15:13 GIT again Piotr Hosowicz
2011-01-07 15:43 ` Michal Hocko
2011-01-07 16:07   ` Piotr Hosowicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox