GitHub为什么说我有文件冲突,但我的本地分支说一切都是最新的?

huangapple go评论56阅读模式
英文:

why github said I have file conflict, but my local branch said everything is up to date?

问题

你好,我尝试提出拉取请求(PR),GitHub显示我的几个文件存在冲突。所以我:\n
(1) 复制远程的文件并在本地比较它们,它们是相同的(使用 diff 工具)。
(2) 我在本地分支上执行了 git 拉取,消息显示一切都是最新的。
还能做些什么来解决这个问题?

英文:

Hi I tried to raise PR and github show several of my files are in conflict. so I:
(1) copy the file at remote and compare the file locally they are identical. ( using diff checker)
(2) I did git pull of my local branch and the message said everything is up to date
What else can I do to pass this issue?

答案1

得分: 1

一个拉取请求是两个分支之间的合并请求。冲突出现是因为你的源分支中的文件与目标分支中的文件发生了冲突。
因此,你应该拉取目标分支并在本地解决冲突(通过合并或拉取--rebase,由你决定),然后推送已解决的冲突。

英文:

A pull request is a merge request between two branches. The conflict is raising cause there are conflicts between the files in your source branch and the files in the destination branch.
So you should pull the destination branch and fix the conflicts locally (by merge or pull --rebase, that's up to you) then push the resolved conflict

huangapple
  • 本文由 发表于 2023年6月2日 01:06:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76384190.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定