[英]Bitbucket: Update a fork to merge changes of master repo?
I am working with a bitbucket git repo I have read-only access to, so I created a fork to work on my features.我正在使用一个我拥有只读访问权限的 bitbucket git repo,所以我创建了一个 fork 来处理我的功能。
Question: How do I update my fork to include changes made to the original repo made by the owner?问题:如何更新我的 fork 以包含所有者对原始 repo 所做的更改?
On github, it seems one has to do the following, so I suspect it's a similar to this:在github上,似乎必须执行以下操作,所以我怀疑它与此类似:
$ git remote add upstream git://github.com/octocat/Spoon-Knife.git
$ git fetch upstream
$ git merge upstream/master
I couldn't find any information on this in the Bitbucket Documentation for forking我在用于分叉的Bitbucket 文档中找不到任何关于此的信息
Just like GitHub, you have to pull the commits down to your own machine, merge, and then push them back to your fork on Bitbucket.就像 GitHub 一样,你必须将提交拉到你自己的机器上,合并,然后将它们推回到你在 Bitbucket 上的分支。
If you go to your fork on Bitbucket you can click "compare fork" to get to a page where you see incoming and outgoing commits.如果您转到 Bitbucket 上的分叉,您可以单击“比较分叉”以进入您看到传入和传出提交的页面。 If you go to the "incoming" tab, you will see instructions like如果您转到“传入”选项卡,您将看到类似的说明
$ git remote add <remote_name> git@bitbucket.org:<upstream>/<repo>.git
$ git fetch <remote_name>
$ git checkout master
$ git merge <remote_name>/master
which correspond closely to the GitHub instructions.与 GitHub 说明紧密对应。
https://bitbucket.org/<user name>/<fork name>/branches/compare
使 URL 看起来像这样: https://bitbucket.org/<user name>/<fork name>/branches/compare
: https://bitbucket.org/<user name>/<fork name>/branches/compare
Ahhhhhh here comes the easiest way.... Ahhhhhh 最简单的方法来了......
1. Go to your fork repo. 1. 去你的 fork 仓库。
2. Select Repository Settings tab. 2. 选择存储库设置选项卡。
3. Select Fork Syncing tab. 3. 选择叉同步选项卡。
4. Deselect automatic sync . 4.取消选择自动同步。
5. Re-select automatic sync . 5.重新选择自动同步。
Life just got easy with this hack.有了这个黑客,生活变得轻松了。
在最新版本中,如果根目录有未合并的更新,则右侧有一个Repository-Details框和一个同步按钮。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.