In my branch, I moved 90% of the methods from one test class to another.
In main branch, someone added one method to the class I moved the code out of.
Then I went to do a downmerge; our convention is that you always merge from the main branch to your work branch before going the other way. I used:
git pull origin develop
The resulting merge created a file containing all the code that I had removed. I would have expected a 3-way merge to apply, which would have 'kept' my deletion and the other branch's addition. So I had to manually re-edit to get rid of all the classes that I'd deleted from the 'origin' class. Of course, I had to manually move the one new method; no objection there.
Is there an alternative git merge strategy which might have recognized what I meant?
I would suggest to:
git pull --rebase origin develop
This puts your local commits on top of the remote commits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With