假设我有两个分支,develop和release_v1,我想将release_v1分支 merge 到develop。
我做了一个pull request merge release_v1来开发,但是pull request做完之后发现有冲突
我该如何解决冲突?要执行哪些步骤?
提前致谢。
最佳答案
How can I solve the conflict? which are the steps to perform?
一旦发生冲突,请按照以下步骤进行修复:
# 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
此时,您的 release_v1 包含有冲突的 2 个分支的内容
现在在你们的冲突中。
一旦你完成了
# add the fixed conflicts and commit
git add . && git commit
git push origin release_v1
返回您的 git 服务器,现在您将能够 merge pull 请求,因为所有冲突都已解决
关于git - 如何解决 pull 请求中的冲突?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53346762/