git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: how to merge sub directory or file?

From
EREmily Ren <lingyan.ren@gmail.com>
Date
Nov 8, 2011, 07:08 UTC
Message-ID
<CAP_m3yKehN1-KtMCVxKdu2ca59GzYE0w2X2=UhH2X9PgzYiMAg@mail.gmail.com>
In-Reply-To
<20111107193708.6cf2ae81.kostix@domain007.com>
Hi Kon,

Thank you !  I tried that method, it failed on read-tree because B/dir3 already exists, Cannot bind.

$ git read-tree --prefix=dir3 -u A:dir3 error: Entry 'dir3/file1' overlaps with 'dir3/file1'.  Cannot bind.

And my case is that not all A's sub direcotries are in B. For example, in A's dir3, there are file1, dir4 and dir5. But in B's dir3, only file1 and dir4 exist, there's no dir5. How to handle this case ?

Thanks, Emily

On Mon, Nov 7, 2011 at 11:37 PM, Konstantin Khomoutov <flatworm@users.sourceforge.net> wrote:

Show 13 quoted lines
>
> On Mon, 7 Nov 2011 22:54:18 +0800
> Emily <lingyan.ren@gmail.com> wrote:
>
> > I have two git projects A and B, content of B is subset of A. For
> > example, Project  A and B's tree are as below:
> [...]
> > When there's new changes in project A, how can I merge them to
> > project B without changing B's directory structure?
> >
> > Your help will be highly appreciated.
> Subtree merging maybe?
> See http://progit.org/book/ch6-7.html
Previous: Konstantin Khomoutov
Message 9 of 9 in “BUG. Git config pager when --edit”
  1. Alexey ShumkinNov 7, 2011
  2. Frans KlaverNov 7, 2011
  3. Jeff KingNov 7, 2011
  4. Junio C HamanoNov 7, 2011
  5. Jeff KingNov 7, 2011
  6. Frans KlaverNov 7, 2011
  7. how to merge sub directory or file?Emily, Nov 7, 2011
  8. Konstantin KhomoutovNov 7, 2011
  9. Emily RenNov 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.