Nikita Vlasenko
Nikita Vlasenko

Reputation: 4352

github: how to record merge conflicts

I have one branch local_branch and I merged into it from a new remote. Now there is a plenty of merge conflicts that I need to resolve. After solving them I need the resolution of the conflicts to propagate somehow to local master branch (by issuing pull request) instead of resolving them over between master and local_branch.

Whats best way to achieve that?

I don't want to directly merge the new remote into master because I want to issue a git pull request for the old remote for my colleagues to see which and how conflicts were resolved.

Just to clarify:

  1. new_remote branch -> local_branch (from old remote)
  2. Resolve merge conflicts
  3. Pull request to merge to master (how to avoid second resolution of the very same conflicts?). master is pretty close to the local_branch, so between them there are no issues (before new remote merge)

Upvotes: 0

Views: 53

Answers (1)

Schwern
Schwern

Reputation: 164809

Merge master into local_branch, resolve the conflicts, then push. This should be your normal process: update your branch, then push.

If master and new_remote_branch are similar you should not have to resolve the same conflicts twice; Git merging compares only the tips of each branch, not the histories. You may have different conflicts.

Try it. If it goes really wrong you can always abort the merge: git merge --abort

Upvotes: 1

Related Questions