简体   繁体   English

从上游开发分支更新分叉的仓库? (不是我们可以合并的东西)

[英]Updating forked repo from upstream develop branch? (Not something we can merge)

[Edit #2]: adding new details [编辑#2]:添加新的详细信息

Hi all - have been doing a good amount of research on this but haven't found something that matches my situation. 大家好-对此进行了大量研究,但没有找到适合我的情况。

I'm following the process here to keep a fork updated: there are a lot of resources online about keeping my fork updated if their changes are on their master branch, eg Git merge from someone else's fork 我正在按照此过程来更新fork:如果他们的更改在其master分支上,则有很多在线资源可以使我的fork更新,例如, Git从其他人的fork合并

Here's the process I'm following. 这是我要遵循的过程。

[inside local directory for given repo] [在给定回购的本地目录内]

git remote add origin [link]; git remote add upstream [link]

git fetch upstream

git checkout master

git merge --no-ff upstream/master

My attempt to merge gives me --no-ff - not something we can merge which is a tough error to decode! 我的merge尝试给了我--no-ff - not something we can merge ,这很难解码!

The only thing I could see missing is an update to the master branch before the merge --no-ff 我唯一看不到的是merge --no-ff之前对master分支的更新merge --no-ff

git checkout master
git pull

Just to make sure master itself is up-to-date. 只是为了确保master本身是最新的。

The OP AmeySMahajan added in the comments : OP AmeySMahajan 在评论中添加

Incorporated git checkout master then git pull upstream master and then the merge line, but still getting merge: --no-ff - not something we can merge , unfortunately. 合并了git checkout master然后git pull upstream master ,然后是合并行,但是仍然merge: --no-ff - not something we can merge不幸的merge: --no-ff - not something we can merge

But: A pull is a fetch + merge , so an additional merge ( --no-ff or not) of upstream/master , which you already pulled, would not do anything. 但是: pullfetch + merge ,因此upstream/master附加 merge (无论是否--no-ff ),您已经进行merge ,将不会执行任何操作。

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

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