GitHub : How to Sync from Forked repoit

Hi Friends,

Fork is not a git concept, its a github concept (github is a git repository host / provider). Fork mean a your personalized copy of base repository in the github account/host. The work flow is

  1. Create a Fork (copy of base repo)
  2. Clone the Forked (your personalized) repo to local box
  3. Commit changes in local and push to origin.
  4. Sync local from Fork upstream
  5. Create Pull request.

githubFork

 

Here is the hands on exercise and explanation on youtube

Usually in git there is only origin and local, in git hub as we have origin and upstream, we can sync by follow below commands.

premaseem$ git remote -v 

premaseem$ git remote add upstream git@remoteURL.github.com

premaseem$ git remote -v 

premaseem$git fetch upstream

premaseem$ git merge upstream/master

premaseem$ git push origin master

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s