Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Pull Request complex conflicts

GitHub added a feature about a month ago to resolve merge conflicts on the web interface, however it only works for "simple" merge conflicts:

No conflicts GitHub Pull Request - No conflicts

Simple conflicts

GitHub Pull Request - Resolve simple conflicts

Complex conflicts

GitHub Pull Request - Resolve complex conflicts

In the blog post that introduced the new feature, GitHub mentions competing line changes, which can range from fairly simple to quite complex.

What qualifies as a conflict too complex to resolve in the web editor?

like image 345
rink.attendant.6 Avatar asked Jan 15 '17 19:01

rink.attendant.6


People also ask

What causes conflicts in GitHub?

Often, merge conflicts happen when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file. You must resolve all merge conflicts before you can merge a pull request on GitHub.

How to fix merge conflicts in git pull requests?

So, now that you know what is a merge conflict and when does it occur, let’s see how to fix it! Follow these steps to resolve merge conflicts in Git pull requests: We will make sure that code on both the branches is updated with the remote. If not, first take pull of both the branches or push your local changes if any.

Is it hard to handle merge requests that have a conflict?

However, merge requests that have a conflict are a little bit more hard to handle. Here’s how I get this done. In this example, let’s work with 2 branches:

How do I resolve a branch conflict in a pull request?

If prompted, review the branch that you are committing to. If the head branch is the default branch of the repository, you can choose either to update this branch with the changes you made to resolve the conflict, or to create a new branch and use this as the head branch of the pull request.

How to issue a pull request from local repository?

feature-1 (the branch issuing pull request) Step 1: Verify your local repo To start off, ensure that you have the latest files for the prodbranch. git checkout prod git pull origin prod This will ensure that the files on local repository are in-sync with your remote git repo (Github/Bitbucket, etc). Step 2: Switch to branch


1 Answers

This seems to happen if any files were renamed, I had a pull request that included renamed files showing the same message and as soon as I named the files back and committed that the "Resolve conflicts" became available again

like image 159
valexa Avatar answered Oct 10 '22 01:10

valexa