* Merging only a subdirectory from one branch to the other
@ 2012-02-07 9:38 Howard Miller
2012-02-07 15:24 ` Taylor Hedberg
2012-02-10 0:51 ` Neal Kreitzinger
0 siblings, 2 replies; 3+ messages in thread
From: Howard Miller @ 2012-02-07 9:38 UTC (permalink / raw)
To: git
Hi,
I've been Googling for this one and am, mostly, more confused than
when I started so if you could humor me for a moment.
I have a branch with a particular subdirectory tree. The tree has a
lot of history. However, all the history for that subdirectory is
exclusive to it (no commits changed anything outside it). I now need
to merge that subdirectory into a completely different branch without
loosing any history. I think git-read-tree might have something to do
with it but I don't understand the help file at all. Any help
appreciated.
Cheers....
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Merging only a subdirectory from one branch to the other
2012-02-07 9:38 Merging only a subdirectory from one branch to the other Howard Miller
@ 2012-02-07 15:24 ` Taylor Hedberg
2012-02-10 0:51 ` Neal Kreitzinger
1 sibling, 0 replies; 3+ messages in thread
From: Taylor Hedberg @ 2012-02-07 15:24 UTC (permalink / raw)
To: Howard Miller; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
Howard Miller, Tue 2012-02-07 @ 09:38:22+0000:
> I have a branch with a particular subdirectory tree. The tree has a
> lot of history. However, all the history for that subdirectory is
> exclusive to it (no commits changed anything outside it). I now need
> to merge that subdirectory into a completely different branch without
> loosing any history. I think git-read-tree might have something to do
> with it but I don't understand the help file at all. Any help
> appreciated.
You might find git-subtree [1] useful for this. The `git subtree split`
sub-command in particular enables you to factor out the history of a
particular subdirectory in your repo into a separate branch, which you
could then merge into some other branch as desired.
[1] https://github.com/apenwarr/git-subtree
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Merging only a subdirectory from one branch to the other
2012-02-07 9:38 Merging only a subdirectory from one branch to the other Howard Miller
2012-02-07 15:24 ` Taylor Hedberg
@ 2012-02-10 0:51 ` Neal Kreitzinger
1 sibling, 0 replies; 3+ messages in thread
From: Neal Kreitzinger @ 2012-02-10 0:51 UTC (permalink / raw)
To: Howard Miller; +Cc: git
On 2/7/2012 3:38 AM, Howard Miller wrote:
> I have a branch with a particular subdirectory tree. The tree has a
> lot of history. However, all the history for that subdirectory is
> exclusive to it (no commits changed anything outside it). I now need
> to merge that subdirectory into a completely different branch without
> loosing any history. I think git-read-tree might have something to do
> with it but I don't understand the help file at all. Any help
> appreciated.
>
Does the 'subtree merge' described in this link do what you want:
http://progit.org/book/ch6-7.html
(I can't say I've actually tried it myself, yet.)
v/r,
neal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-10 0:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 9:38 Merging only a subdirectory from one branch to the other Howard Miller
2012-02-07 15:24 ` Taylor Hedberg
2012-02-10 0:51 ` Neal Kreitzinger
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 NNTP newsgroup(s).