Reputation: 2818
I have certain commits in a branch, 10.57, which I want to merge to another branch 10.58.
I would normally cherry-pick those commits from 10.57 to 10.58.
There is however a glitch. Certain files have changed their directory structure in 10.58.
Example: The source dir MAAS/ios-web-services
in 10.57 has moved to MAAS/apple/ios-web-services
in 10.58.
If I cherry pick as before my changes would created afresh as new files/directories in MAAS/ios-web-services
instead of getting merged to files in MAAS/apple/ios-web-services
.
Is there a way I can ask git to factor in this change in directory structure?
Git cherry pick files, from Directory A to Directory B seems to suggest editing patches and applying them manually. Is there no other easier way?
Upvotes: 8
Views: 6394
Reputation: 31
Upvotes: 0
Reputation: 519
If the files only have minor changes you can try using merge.renameLimit
as described for merging branches here: How to merge two branches with different directory hierarchies in git?
Upvotes: 1