* How to pick a commit from another git tree?
@ 2007-10-07 17:31 Joakim Tjernlund
2007-10-07 17:50 ` Pierre Habouzit
2007-10-07 20:10 ` Alex Riesen
0 siblings, 2 replies; 3+ messages in thread
From: Joakim Tjernlund @ 2007-10-07 17:31 UTC (permalink / raw
To: git
Hi
This is probably a somewhat stupid question but I havn't had a need until now so here goes:
There is a commit in David Millers tree:
http://git.kernel.org/?p=linux/kernel/git/davem/bak-net-2.6.24.git;a=commit;h=bbb4c0c35a4c2aed5e025b668c8dfc99c5b74cff
that hasn't made it into 2.6.23, but will go into 2.6.24.
I need this fix on top of 2.6.23(once it is released).
Now I wonder how to best add this fix to my tree. Once this fix hits linus tree and I pull
linus tree, I don't wan't a conflict as I already have this fix in my tree.
Should I just pull Davids tree? Or should I cherry-pick this one commit?
Or something else?
Jocke
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to pick a commit from another git tree?
2007-10-07 17:31 How to pick a commit from another git tree? Joakim Tjernlund
@ 2007-10-07 17:50 ` Pierre Habouzit
2007-10-07 20:10 ` Alex Riesen
1 sibling, 0 replies; 3+ messages in thread
From: Pierre Habouzit @ 2007-10-07 17:50 UTC (permalink / raw
To: Joakim Tjernlund; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
On Sun, Oct 07, 2007 at 05:31:00PM +0000, Joakim Tjernlund wrote:
> Hi
>
> This is probably a somewhat stupid question but I havn't had a need until now so here goes:
> There is a commit in David Millers tree:
> http://git.kernel.org/?p=linux/kernel/git/davem/bak-net-2.6.24.git;a=commit;h=bbb4c0c35a4c2aed5e025b668c8dfc99c5b74cff
> that hasn't made it into 2.6.23, but will go into 2.6.24.
> I need this fix on top of 2.6.23(once it is released).
> Now I wonder how to best add this fix to my tree. Once this fix hits linus tree and I pull
> linus tree, I don't wan't a conflict as I already have this fix in my tree.
>
> Should I just pull Davids tree? Or should I cherry-pick this one commit?
> Or something else?
The easiest way is to fetch his tree (git remote add ...; git fetch)
and then yes, cherry-pick the commit(s) you need.
If you need more than one commit, you can use:
git rebase --onto <your tip> fromCommit toCommit
and it will move ]fromCommit..toCommit] onto <your tip>
It's likely that the fetch will be quite cheap as I suppose that David
Millers tree as very few objects different from linus tree (compared to
the linux2.6 git repository size I mean).
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to pick a commit from another git tree?
2007-10-07 17:31 How to pick a commit from another git tree? Joakim Tjernlund
2007-10-07 17:50 ` Pierre Habouzit
@ 2007-10-07 20:10 ` Alex Riesen
1 sibling, 0 replies; 3+ messages in thread
From: Alex Riesen @ 2007-10-07 20:10 UTC (permalink / raw
To: Joakim Tjernlund; +Cc: git
Joakim Tjernlund, Sun, Oct 07, 2007 19:31:00 +0200:
> This is probably a somewhat stupid question but I havn't had a need until now so here goes:
> There is a commit in David Millers tree:
> http://git.kernel.org/?p=linux/kernel/git/davem/bak-net-2.6.24.git;a=commit;h=bbb4c0c35a4c2aed5e025b668c8dfc99c5b74cff
> that hasn't made it into 2.6.23, but will go into 2.6.24.
> I need this fix on top of 2.6.23(once it is released).
$ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/davem/bak-net-2.6.24.git
$ git cherry-pick bbb4c0c35a4c2aed5e025b668c8dfc99c5b74cff
> Now I wonder how to best add this fix to my tree. Once this fix hits linus tree and I pull
> linus tree, I don't wan't a conflict as I already have this fix in my tree.
Depending on the state the Davids tree ends up when it is merge into
Linus' tree you may or may not get a conflict. It is not in your hands
either way.
> Should I just pull Davids tree? Or should I cherry-pick this one commit?
> Or something else?
I would just cherry-pick it, and revert it (or hard-reset my tree to
Linus' tree) if it conflicts later.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-07 20:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-07 17:31 How to pick a commit from another git tree? Joakim Tjernlund
2007-10-07 17:50 ` Pierre Habouzit
2007-10-07 20:10 ` Alex Riesen
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).