In Git, we have a
develop branch from which we make
feature branches for each feature. I see two ways of merging the latest changes in
develop with my feature branch code.
- Merge the latest
developcode into my feature branch.
- Merge my feature branch into the local
If I do the first way, the pull request I make for my
feature for a code review includes the final merged code where changes in
develop overlapped with changes in my
feature, which is good, but now it also includes all the code changed in
develop that I never touched. This makes it hard for the code reviewer to tell exactly what code they are supposed to be reviewing. Also, when I go to merge the feature back into
develop, it looks like I'm committing a bunch of code that I never touched because I pulled it in from
If I do it the second way, the pull request I make for my
feature for a code review hasn't been merged and, therefore, the code reviewer isn't reviewing the code that will ultimately be pushed to develop.
Is there a way to have the best of both worlds, where the pull request I make has my code with any merge conflicts resolved, but doesn't list a bunch of files from
develop that others worked on but that I never touched?