简体   繁体   English

Github 合并冲突

[英]Github merge conflict

I'm having problems with my github for a project I'm currently doing.我目前正在做的一个项目的 github 有问题。 This is the error I'm getting when dealing with the pull request.这是我在处理拉取请求时遇到的错误。

第一个截图

I think I have accidently got all the files on my machine when dealing with the one persons branch, it says I'm 26 Uncommits on my changes on the master.我想我在处理 one person 分支时不小心将所有文件都放在了我的机器上,它说我在 master 上的更改是 26 Uncommits。

第二张截图

If I just sync it straight to the master will github pick up the code was his?如果我直接将它同步给主人,github 会拿起他的代码吗? cause I don't want to take credit for somebody else's work.因为我不想因为别人的工作而受到赞扬。

You SHOULD NOT commit these file into git repos.你不应该将这些文件提交到 git repos。

Now please delete them with --cache .现在请使用--cache删除它们。
And add it to gitignore.并将其添加到 gitignore。 Then commit.然后提交。

Example: git rm --cached wil/wil.v12.suo示例: git rm --cached wil/wil.v12.suo

If you keep it in your repo, you will see conflict almost every time.如果你把它保存在你的仓库中,你几乎每次都会看到冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM