How to sync your forked repo with original Repo in Github Desktop

zsubzwary picture zsubzwary · Sep 8, 2017 · Viewed 9.2k times · Source

Please Read this before marking as Duplicate

I know there is a solution for CMD at https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository but i asked for GitHub Desktop, If you can't answer then dont mark as Duplicate

I am new to development, I hear about Git and GitHub learn very basics then I downloaded GitHub Desktop After a while I found a great Open Source project I forked it and cloned the forked Repo in my Github Desktop. I improved some features in and and Synced my local Repo with my GitHub forked Repo, after that I did a Pull Request My addition was accepted and merged into original Repository. I added so many new features and all my Pull requests were Merged.

This is where the Sad Story Starts :( After ten days when I opened my Forked Repo on GitHub Website this is what I saw:

This branch is 12 commits behind Hipo:master

After this I searched web for many hours but can't find solution for GitHub Desktop I know there are tons of tutorial for CMD but I need to know how to sync with original Repo from Desktop Application of GitHub ?

I am new so SORRY if i asked something stupidish :) Thanks

Answer

codestudent picture codestudent · Nov 29, 2018

To sync the master of your fork to the master of the original repository using GitHub Desktop:

Click on the 'current branch' tab and first select 'master' as the current branch (if it's not already selected).

Click on the 'fetch origin' button.

Click on the 'current branch' tab again and click the 'choose a branch to merge into master' button at the bottom.

Button "choose a branch to merge into master"

*NOTE: Looking down this list, you will find 2 entries for every branch. Those that are prefixed with origin/ are the branches in your fork, and those prefixed with upstream/ are those in the original repository on GitHub.

Select upstream/master from this list, and this pull the changes down from the master repository to bring your local clone up to date.

Select upstream/master from this list

Once you local clone has finished pulling the updates from the master repo, push these new changes to your fork, stored on GitHub, using the push origin button on GitHub desktop.