Add a template repository as a remote:

git remote add template [URL of the template repo]

Fetch all changes:

git fetch --all

Merge from the remote to the current branch:

git merge template/[branch to merge] --allow-unrelated-histories

References