Rahul Raj
Rahul Raj

Reputation: 81

How to force merge to succeed when there are conflicts

We are following template branch approach wherein the new feature branch is created from an empty (folder only) template branch (used for information code as we don't want the entire code base to be deployed).

The problem is that when we try to merge the release (having changes for current release) to the master branch (entire codebase), we always end up in merge conflict for the existing files. In case of merge conflict, I would like the changes in the release branch to be merged to the master branch, as I want the latest changes to be retained.

Is there any option to forcefully merge the changes in release branch to master without resolving the conflicts?

Upvotes: 0

Views: 1086

Answers (1)

Adam Tang
Adam Tang

Reputation: 372

  1. git checkout master
  2. git merge -X theirs release

Upvotes: 1

Related Questions