Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save timotheuslin/cb4fb965c6fe18ad9b972b4effb5269a to your computer and use it in GitHub Desktop.

Select an option

Save timotheuslin/cb4fb965c6fe18ad9b972b4effb5269a to your computer and use it in GitHub Desktop.
Keeping a fork up to date
  1. Setup your cloned-fork:

    git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
    cd into/cloned/fork-repo

  2. Add remote from original repository in your forked repository:

    git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
    git fetch upstream

  3. Merge upstream's master branch

    git merge upstream/master

(OR)

  1. Updating your fork from original repo to keep up with their changes:

    git pull upstream master

  2. push

    git push

Ref. https://www.geeksforgeeks.org/sync-your-fork-with-master-in-github/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment