Updating your solution to a new Weavy version

Updating your solution to a new version of Weavy is simple. All you have to do is sync your fork with the latest code from weavy-sln.

Configure a remote

Before you can sync your fork, you must have a remote configured that points to the upstream repository in Git.

  1. Open a command line (in the current working directory of your fork)
  2. List the currently configured remotes for your fork

    C:\Projects\weavy-sln> git remote -v
    origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
    origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
    
  3. Specify a new remote upstream repository to sync with your fork.

    C:\Projects\weavy-sln> git remote add upstream https://github.com/weavy/weavy-sln.git
    
  4. Verify the new upstream repository you’ve specified for your fork.

    C:\Projects\weavy-sln> git remote -v
    origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
    origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
    upstream  https://github.com/weavy/weavy-sln.git (fetch)
    upstream  https://github.com/weavy/weavy-sln.git (push)
    

Sync your fork

With the remote configured you can now sync your fork to keep it up-to-date with changes made in the upstream repository.

  1. Open a command line (in the current working directory of your fork)
  2. Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.

    C:\Projects\weavy-sln> git fetch upstream
    remote: Counting objects: 75, done.
    remote: Compressing objects: 100% (53/53), done.
    remote: Total 62 (delta 27), reused 44 (delta 9)
    Unpacking objects: 100% (62/62), done.
    From https://github.com/weavy/weavy-sln
    * [new branch]      master     -> upstream/master
    
  3. Check out your fork’s local master branch.

    C:\Projects\weavy-sln> git checkout master
    Switched to branch 'master'
    
  4. 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.

    C:\Projects\weavy-sln> git merge upstream/master
    Updating a422352..5fdff0f
    Fast-forward
    README                    |    9 -------
    README.md                 |    7 ++++++
    2 files changed, 7 insertions(+), 9 deletions(-)
    delete mode 100644 README
    create mode 100644 README.md
    

Syncing your fork only updates your local copy of the repository. To update your fork on GitHub, you must push your changes.