Reputation: 315
I have three branches for my repository, master, feature_1, feature_2
I'm working with all my changes on feature_1 branch, and let's say "Tim" branched out feature_2 branch like this from my branch feature_1
----------------- feature_1
\ _ _ _ _ _ _ _ _ _ _ feature_2
----------------- master
Now, when Tim starts working on feature_2 branch, he deletes some files and checks in the code. feature_1 still contains those files. Tim raises pull request to master branch and those files are deleted in master now.
Now, if I raise pull request from feature_1 to master, it should ideally show the changes which states the files are being added, (which Tim deleted in feature_2 branch and merged ). But it is not showing those changes. How to get those changes as diff and merge back to master?
Upvotes: 1
Views: 1194
Reputation: 535989
it should ideally show the changes which states the files are being added
No, that’s not what a merge is or what a diff is. On your branch nothing happened to those files. On master they were deleted. Therefore on a merge they are deleted, as that is the only thing that happened to them. No branch added them.
If you really want the merge to restore the files, I suppose you could edit all the files before the merge. Now the merge would have conflicts between the edit and the delete, which you could resolve manually, making the edit win over the delete.
Or do the merge, then make a branch where you restore the files, and merge that.
Upvotes: 3