git bitbucket 远程服务器上的冲突,但一切都是本地最新的

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39703569/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:18:39  来源:igfitidea点击:

Conflict on bitbucket remote server but everything is up to date locally

gitconflictbitbucket-server

提问by NI6

I'm working on a project, so I pushed a feature branch to the remote repository(using Atlassian bitbucket) and opened a pull request.

我正在处理一个项目,所以我将一个功能分支推送到远程存储库(使用 Atlassian bitbucket)并打开了一个拉取请求。

But on one file, the bitbucket diplay a "MOVED" status, in brown and shows a conflict message :

但是在一个文件上,bitbucket 显示“已移动”状态,呈棕色,并显示一条冲突消息:

conflict: modified on source, modified in target.

this file is in a conflicted state. You will need to resolve the conflict manually before you can merge this pull request.

冲突:在源上修改,在目标中修改。

此文件处于冲突状态。在合并此拉取请求之前,您需要手动解决冲突。

So when I typed:

所以当我输入:

git pull origin my_feature

I get the message

我收到消息

Already up-to-date.

已经是最新的。

How can I resolve this conflict?

我该如何解决这个冲突?

回答by Lets Code

You need to update your local master branch. So do the following steps :

您需要更新本地主分支。因此,请执行以下步骤:

  • git checkout master
  • git pull origin master
  • git checkout << your branch >>
  • git merge master
  • git 结帐大师
  • git pull 原点大师
  • git checkout << 你的分支 >>
  • git合并大师

After you execute the 4th command, you will get merge conflicts. Resolve them and then do :

执行第 4 个命令后,您将遇到合并冲突。解决它们,然后执行:

  • git commit
  • 提交