Merge conflict Git

egit, git

Solution

Just go through the files marked as conflicted by `git status` and find the conflict markers (you can search for `====` in the file). Reconcile the changes between them, figure out if anything else unexpected got broken by the combination of your code, run your tests, and then use `git add` and `git commit` as normal to make a commit merging your friend's new feature with yours.

Upstream: original                 with friend's feature            with both
               \  \               /                \               /
                \  -- Friend's --/                  \             /
                 \                                   \           /
                  ---- Yours ------------------------- your merge

Problem

I and my friend fork from the main repository (upstream). Last night, we had the same version of this repository in local machine. Then I have added a new feature and my friend also added another new feature too. My friend pulled request to the main repository and I have merge this pull request with the upstream repository with no conflict. And when I fetch from upstream and merge with my master branch, it conflicts. What should I do in this situation to resolve conflict? (The upstream repository should have 2 new features after resolving conflict)

Original source

Related problems