How to transfer changes from one branch to another if file name changed?

Viewed 72

I have branch a, where I'm work with file1. Another man work with similar branch b. He made many changes there and renamed file1 to file2. I should checkout to his branch and transfer my changes to his branch. How can I do this? As I understand, stash is not a solution, because file name changed and after stash applying file doesn't appear. How to transfer changes from that file1(branch a) to file2(branch b)?

1 Answers

Use git merge, git pull or git cherry-pick as you would normally would

...to bring changes from one branch to another. Git is usually smart about detecting the name changes and will merge the changes and the name change. If there is a conflict, you will have to handle it. It can be a little confusing, so using a good merge tool helps.

Related