Skip to content

How to fork the ViSH and sync the fork with the original repository

Aldo edited this page Apr 12, 2018 · 6 revisions

Based on: https://help.github.com/articles/syncing-a-fork/ and https://help.github.com/articles/configuring-a-remote-for-a-fork/

  1. Go to the ViSH repository https://github.com/ging/vish , and fork it with your GitHub user using the web interface.

  2. Open a terminal and clone the fork in your working directory.
    git clone [email protected]:yourusername/vish.git

  3. Enter in the fork and add a remote pointing to the original ViSH repository.
    cd vish/
    git remote add upstream https://github.com/ging/vish.git

  4. Fetch changes from ging/vish:
    git fetch upstream

From https://github.com/ging/vish
[new branch] master -> upstream/master
[new branch] otherBranch -> upstream/otherBranch

Now, we have all the updates in upstream/#{branchName}.
The stable version is in upstream/master.

  1. Go to your local master branch (if you are not)
    git checkout master

  2. And finally, merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.
    git merge upstream/master