Merge two git branch with different folder names -


There are two branches in my project: R1 and OPE

The original folder structure of both the branches was now We started working on the OEP branch and the root folder was renamed in the middle of the R1 branch - dev core / projectX / java-files

original core now R1 branch The folder structure is:

  core / projectX / java-files   

and the folder structure of the OPE branch is:

  dev-core / projectX / java-files   

let me at R1 branch in my OPE branch Conduct must merge now that I'm looking for a simple Jiaiti merge R 1 do, Jiaiti R1 a dev-core folder branch and has to be repeated for all files.

I tried to rename folders in OPE using git mv and then trying to git merge R1 Sending messages to almost all files:

  CONFLICT (rename / delete): core / project x / path / copy / java / file R1 has been removed and its name is changed to HEAD. Title of core / projectx / path / copy / java / file was dropped in the tree.   

Now when I am checking the file and looking for conflict (by searching for the symbol ) I am not getting any resistance

Note: I used the - no-commit option during the merger.

More info

I merged in this way:

  git checkout -b ope original / op git checkout -b r1 original / r 1 GIT checkout OPEIIT MV dev-core core GIT merge R1   

Here's what I understand: Let's say that the file dev-core / projectX / file1 I made some changes in this file in my OPE branch and committed it to someone else core / projectX / file1 in R1 branch Made some changes Now, when I merge, there are two possibilities:

  1. Either the git will merge both versions of file1 and give me the & lt; & Lt; & Lt; & Lt;

  2. Or git will understand that file 1 is named as dev-core / projectX / file1 with core / project x / file1 and lets me keep my file and changes to r1 If I am right then the second scenario is my case and this can cause me a loss of the proxy code Plz tells me wrong.

    I tested the name change in the falls git and my understanding was wrong :( The name of the git folder changes and merge smartly. I have to find out.

    Aha, I have found my mistake, GIT is smart and I tried to overwrite it;) I would like to GIT merge me git mv dev-core core added a lot to much of the complexity and caused much trouble: p

    You are not going to see the file with the conflict marker, the conflict says

      CONFLICT (rename / delete): Core / Project X / path / copy / java / file has been removed in R1 and its name is changed to HEAD.   

    Which means that there is a conflict because the file was changed to its current branch, while it was completely removed in R1.

    You have to tell us how to solve this problem (ie, do you want to rename the file or delete it?) Git has left the renamed version of your work copy: / P>

    WordPress HEAD left in the core / projectX / path / to / java / file> tree.

    If you do git status you will see something like this:

      / Pre> 

    You can either use the git add & lt; File & gt; You can choose to rename the file by changing it, or you can call it git rm & lt; File & gt; . Then, in the same way, you resolve the merger dispute in this case.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -