如何使用 SourceTree 更新我的分叉存储库? [英] How do I update my forked repo using SourceTree?
本文介绍了如何使用 SourceTree 更新我的分叉存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 SourceTree(带有 BitBucket)来管理我的代码.我已经分叉了一个 repo,并且父 repo 已经更新.
I am using SourceTree (with BitBucket) to manage my code. I have forked a repo, and the parent repo has been updated.
如何使用 SourceTree 将上游代码合并到我的分叉存储库中?
How do I use SourceTree to merge the upstream code into my forked repo?
推荐答案
首先,设置父仓库:
- 在 SourceTree 中打开您的分叉存储库.
- 在菜单中选择存储库 ➫ 存储库设置...(或按⇧⌘,).
- 在遥控器窗格中,按添加.
- 输入您喜欢的任何名称(通常
upstream
或master
) 和父仓库的 URL/路径. - 按确定,然后按确定.
- Open your forked repo in SourceTree.
- Select Repository ➫ Repository Settings… in the menu (or press ⇧⌘,).
- In the Remotes pane, press Add.
- Enter any name you like (often
upstream
ormaster
) and the URL / path to the parent repo. - Press OK, then OK.
现在,更新:
- 在工具栏中选择拉.
- 在从存储库拉取"下拉列表中,从您的复刻切换到您刚刚添加的存储库.
- 按确定.
- (可选)拉取后,您可能希望将任何新内容推送到服务器.
- Select Pull in the toolbar.
- In the "Pull from repository" drop-down, switch from your fork to the repo you just added.
- Press OK.
- (Optional) Once you pull, you may want to push any new content up to the server.
这篇关于如何使用 SourceTree 更新我的分叉存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文