如何使用SourceTree更新我的分叉存储库? [英] How do I update my forked repo using SourceTree?
本文介绍了如何使用SourceTree更新我的分叉存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用SourceTree(带有BitBucket)来管理我的代码.我已经分叉了一个存储库,并且父存储库已更新.
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.
现在,要更新:
- 在工具栏中选择拉动.
- 在从存储库中提取"下拉列表中,从您的fork切换到刚添加的存储库.
- 按确定".
- (可选)拉动后,您可能希望将任何新内容推送到服务器.
- 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屋!
查看全文