如何使用SourceTree更新我的分叉存储库? [英] How do I update my forked repo using SourceTree?

查看:169
本文介绍了如何使用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?

推荐答案

首先,设置父仓库:

  1. 在SourceTree中打开您的分叉存储库.
  2. 在菜单中选择存储库存储库设置... (或按 ).
  3. 远程窗格中,按添加.
  4. 输入您喜欢的任何名称(通常为upstreammaster )和父存储库的URL/路径.
  5. 按确定",然后按确定".
  1. Open your forked repo in SourceTree.
  2. Select RepositoryRepository Settings… in the menu (or press ,).
  3. In the Remotes pane, press Add.
  4. Enter any name you like (often upstream or master) and the URL / path to the parent repo.
  5. Press OK, then OK.

现在,要更新:

  1. 在工具栏中选择拉动.
  2. 在从存储库中提取"下拉列表中,从您的fork切换到刚添加的存储库.
  3. 按确定".
  4. (可选)拉动后,您可能希望将任何新内容推送到服务器.
  1. Select Pull in the toolbar.
  2. In the "Pull from repository" drop-down, switch from your fork to the repo you just added.
  3. Press OK.
  4. (Optional) Once you pull, you may want to push any new content up to the server.

这篇关于如何使用SourceTree更新我的分叉存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆