Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging branches afer migration #21

Open
calinvoichita opened this issue Mar 16, 2018 · 6 comments
Open

Merging branches afer migration #21

calinvoichita opened this issue Mar 16, 2018 · 6 comments

Comments

@calinvoichita
Copy link

Hi,

Thanks for the script, it works as expected. Had some issues with slashes in the branch names, but you guys fixed them in the mean time.

We've been using git flow in all our individual repos until now. After running the migration script, as expected we have master, develop, and a few feature/X branches. The problem comes when trying to finish one of the features (merge it do develop). Git seems to be very confused and throws a lot of conflicts. Some concrete examples include:

  1. develop contains a file, while feature/f1 has deleted it.
  2. develop contains a file, while feature/f1 has renamed it.
  3. small files with changes (this can be fixed with setting rename-threshold lower)

Trying to perform the same merge in the original repository shows no conflict. Based on my understanding, this issue arises because read-tree shows as an independent copy on each individual branch (develop and feature/f1).

Did anybody encounter this issue? Any recommendations?

Thanks,
Calin

@amrtn
Copy link

amrtn commented Apr 17, 2018

I've encountered the same problem. Still investigating the issue.

@Florent38
Copy link

Florent38 commented Jun 5, 2018

Hi,

I've encountered the same problem.
Did you find a workaround ?

Thanks,
Florent

@Strandfelt
Copy link

I have the same issue. Did any of you have some luck with a workaround?

@Florent38
Copy link

Yes, have a look at git subtree and specially -X option ;-)
https://medium.com/@porteneuve/mastering-git-subtrees-943d29a798ec

I have used tomono to create the monorepo for all develop branches and then use subtree merge to recreate old feature, release, hotfix, ... branchs on the new monorepo :
git checkout develop
git checkout -b
git merge -X subtree= /

And it worked !

If you used tomono to create more than one branch, you won't be able to merge them in the future

@babilog
Copy link

babilog commented Jan 15, 2022

We're running into the same issue with no clear fix. For instance, we have our master and develop branches, however, we can't seem to merge master into develop due to the CONFLICT (rename/delete) issue.

hraban added a commit that referenced this issue Mar 17, 2024
hraban added a commit that referenced this issue Mar 17, 2024
@hraban
Copy link
Owner

hraban commented Mar 17, 2024

I had a look at this but I can't easily reproduce it. Do you have an example?

Here is a sample test script that seems to work OK:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants