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

Fwd: Query on GIT merge and conflicts

From
VVVijay Sundar V <dops.vijayv@gmail.com>
Date
Feb 7, 2019, 07:59 UTC
Message-ID
<CAMj2QEsdJLsATrOvGJwGpe2fv=QzVU-6LqWJtdZArdMjFyZiYA@mail.gmail.com>
In-Reply-To
<CAMj2QEvOzOUbLvwudAn5zoyOqc=HixsQ+SuU__rU4GZ5uDN6ww@mail.gmail.com>
Hi Team,

I've query for which we have no solutions from Stackoverflow. Or we couldn't find one. Would be great if you have one or can provide suggestions with.

SO Link: https://stackoverflow.com/questions/53704320/git-merge-remote-repository-project-to-sub-directory-of-current-repository-proje

I need to merge a particular branch from one project to a different branch in another currently running project . For which I am following below steps

In Source Repo-A: v23-branch, I created a local temp branch and moved all the contents to a folder and made a local commit. Then In Target Repo-B, I added the local git path like given below. git remote add tmpmerge <local url of Source Repo-A: v23-branch> Then did a git fetch of tmpmerge to get the branch details of Source Repo-A. And while doing a git merge tmpmerge/temp --allow-unrelated-histories, I get so many merge conflicts as describe in the bottom.

Below is the tree structure I am expecting to achieve it
Source Repo-A: v23-branch
   module1
   module2
   pom.xml
   Dockerfile
Target Repo B: some-branch
   source Repo-A: v21-branch
   |-module1
   |-module2
   |-pom.xml
   |-Dockerfile
   Repo-B-Files1
   Repo-B-Files2
   Repo-B-Files3
   pom.xml
   Jenkinsfile
   Dockerfile
What I want to achieve is given below.
Target Repo B: some-branch
source Repo-A: v21-branch
|-source Repo-A: v23-branch
  |-module1
  |-module2
  |-pom.xml
  |-Dockerfile
|-module1
|-module2
|-pom.xml
|-Dockerfile
Repo-B-Files1
Repo-B-Files2
Repo-B-Files3
pom.xml
Jenkinsfile
Dockerfile

I want to merge source repo module to the destination module as mentioned above structure because While merging contents as parent directory overwrites some of my existing files available in the current project like pom.xml , docker file etc. Instead of merging to current project parent directory I want to write as sub directory with all its log and history. But I'm facing CONFLICT(rename/delete), CONFLICT(rename/rename) for module files... Thanks much in advance.

Thanks,
Vijay V
Message 1 of 1 in “Fwd: Query on GIT merge and conflicts”
  1. Vijay Sundar VFeb 7, 2019

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.