How to resolve conflict in pull request?

Viewed 13108

Suppose I have two branches, develop and release_v1, and I want to merge the release_v1 branch into develop.

I do a pull request to merge release_v1 to develop, but, after the pull request has been done, I discover that there is a conflict

How can I solve the conflict? which are the steps to perform?

Thanks in advance.

1 Answers

How can I solve the conflict? which are the steps to perform?

Once you have conflicts follow those steps to fix it:

# clean your local working directory with a stash or commit

# update your local repo with the content of the remote branches
git fetch --all --prune

# checkout the release_v1 branch
git checkout release_v1 

# update the content if required
git pull origin release_v1 

# merge the desired branch
git merge origin/master

At this point, your release_v1 contains the content of the 2 branches with the conflicts And now in your conflicts.

Once you have done with that

# add the fixed conflicts and commit
git add . && git commit 
git push origin release_v1 

Go back to your git server and now you will be able to merge the pull request since all conflicts are resolved

Related