We provide a number of templates for you to build from and customize. From time to time we will make updates to fix bugs and to add new features.

This guide shows how we can use the ‘git source code tool’ to check for updates to a template that you are using and to merge those changes into your code.

Git is a powerful tool, if you are new to git, the following link has a number of tutorials to get you started https://try.github.io/.

Firstly when you clone a template using npx s72-kibble init command, we will automatically add a git remote  to your local repository.

> npx s72-kibble init

> git remote -v
upstream https://github.com/indiereign/shift72-template-one.git (fetch)
upstream https://github.com/indiereign/shift72-template-one.git (push)

 This git remote upstream links your code to the template that you selected. 

Now we can check for the differences between your current code and our code.

# first get the latest changes, you need to do this each time
> git fetch upstream
remote: Counting objects: 458, done.
From https://github.com/indiereign/shift72-template-one

# second check what differences are between the our code and your code, this will check the master branch on the upstream code base with your current branch
> git diff remotes/upstream/master...

There could be a lot of changes or there could be a few. Check closely to see if the change is important to you or not.

# finally attempt to our updates into your code
>git merge upstream/master

Git can be complicated, so make sure you have your changes pushed somewhere safe.

Did this answer your question?