We provide a number of templates for you to build from and customise. From time to time we will make updates to these to fix bugs and to add new features.
This tutorial 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 https://try.github.io/ has a number of tutorials to get you started.
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)
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.
# 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. You need to check closely the differences 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.