How do I update my forked repo using SourceTree?

GitGithubMercurialBitbucketAtlassian Sourcetree

Git Problem Overview


I am using SourceTree (with BitBucket) to manage my code. I have forked a repo, and the parent repo has been updated.

How do I use SourceTree to merge the upstream code into my forked repo?

Git Solutions


Solution 1 - Git

First, set up the parent repo:

  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.

Now, to update:

  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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAaron BragerView Question on Stackoverflow
Solution 1 - GitAaron BragerView Answer on Stackoverflow