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

Re: How to merge some specific project folder into an empty branch.

From
Eric Miao <eric.y.miao@gmail.com>
Date
Jul 21, 2009, 06:48 UTC
Message-ID
<4A6564D9.10901@gmail.com>
In-Reply-To
<1248158311445-3293753.post@n2.nabble.com>
zoucunliang wrote:
Show 8 quoted lines
> Hi all,
> 
> Currently i want to merge one project into another git branch. For example I
> have a branch name A and there is a project called p1 under folder
> projects/p1/. and i have a empty branch B. i just want to merge project
> "projects/p1/" into my empty branch B. But I don't want to merge other
> parts(for example projects/p2). Can anyone help me please? 
> 
OK,

I'm not sure if I understand your question clearly, but let's see if the below will work for you:

# git remote add p1 ".../projects/p1" # git fetch p1

And assume the branch you wanna merge in P1 is C

# git checkout B # git merge p1/C

Yet I see no benefit of doing so with project p1 and p2 to be very different.
Previous: zoucunliang
Message 2 of 2 in “How to merge some specific project folder into an empty branch.”
  1. zoucunliangJul 21, 2009
  2. Eric MiaoJul 21, 2009

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.