How do I update my forked repo using SourceTree?
40,456
First, set up the parent repo:
- 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.
Now, to update:
- 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.
Author by
Aaron Brager
I have a secret plan to fight inflation. #SOreadytohelp
Updated on June 30, 2020Comments
-
Aaron Brager almost 4 years
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?
-
am_ about 9 yearsI also had to press "Refresh" next to Remote branch to pull. And then select "master" there before I could hit OK.
-
Neo almost 5 yearsA more elaborate summary of this is at this blog which of course credits this SO answer.