Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k points)
I have a master branch. There I have a file called "a". I add and commit the file. Then I create a branch called "f-a". I create a file there called "f-a" in this file I include the "a" file which was created during the master branch. Add and commit those changes. Meanwhile, some other developer renamed "a" file in his own branch and merged back to the master branch. I then move back to the master branch and merge the f-a branch into it. Boom I include the "a" file which is now called... mmm let us say... "B".

Is there a way to resist this kind of problem?

1 Answer

0 votes
by (119k points)

So you can try to merge into master with

git rebase --strategy-option="find-renames=20" master

This will set the threshold to 20% when detecting renames upon rebasing onto the master branch, where the similarity of 20% would consider two files the same and do a rename.

Also, check out this Git Tutorial to know more.

Browse Categories

...