Don't let git rename files during merge

2019-07-27 06:45发布

I'm trying to merge branch 'a' into branch 'b'. I have files that are the same in each branch, where the only difference is the filenames. When I merge 'a' into 'b', the filenames for 'a' overwrite 'b', is there a way to stop this?

These files are also in a directory, it would be good if I could prevent any file being renamed in that directory.

Or alternatively, is there a way to restore the old filenames after the merge?

标签: git merge rename
1条回答
男人必须洒脱
2楼-- · 2019-07-27 07:13

Seems like:

git merge -X --no-renames a

Did the trick, thanks to the people on #git on irc.freenode.net

查看更多
登录 后发表回答