That means that your pull request can't be merged into the upstream without the upstream owner(s) having to resolve merge conflicts.
The resolution here would be for you to do a fetch from the upstream and then resolve the merge conflicts from the upstream. At this point, if you theoretically resolve the conflicts from the upstream and then create your pull request, upstream would be able to automatically merge in your pull request without having any conflicts (provided there were no commits on the upstream between you locally resolving the upstream merge conflicts and merging into your local/fork, and then creating the pull request).
Let's use GitHub as an example here for remote repo store.
OriginalAccount
epo1 - say this is the original repository (we will refer to this as "upstream")
YourAccount
epo1 - this would be your fork of the repository (this is typically the "origin" remote)
repo1 local - this is your local copy of the repository.
When you create a pull request from YourAccount
epo1 to OriginalAccount
epo1 (virtually from origin to upstream), seeing the message that you can't merge automatically means that OriginalAccount
epo1 has commits that YourAccount
epo1 doesn't have (commits that were most likely pushed after you forked).
The solution here would be to fetch from upstream to your local repository (from OriginalAccount
epo1 to your local repo) and resolve any merge conflicts locally. Then push your commits to YourAccount
epo1. At this point, you should be able to create your pull request that should be able to be automatically merged into OriginalAccount
epo1.
Note: Even though most Git services won't prevent you from continuing on with a pull request that requires the upstream contributors to resolve merge conflicts, it is good practice and good etiquette to ensure that your pull request merges with no conflict. Think about it like this, you should be doing the merge conflict resolution work, instead of having the upstream contributors doing that work from your contribution.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…