I have created a Template Repository in GitHub and then created some repositories based on the template. Since they were created, there have been updates to the template that I want to pull into those repositories.
Is this possible?
If you want to merge changes from a template into your project, you're going to need to fetch all of the missing commits from the template, and apply them to your own repo.
Just navigate to the Settings page and then click on the 'Template repository' checkbox. Once the template repository is created anyone who has access to it will be able to generate a new repository with same directory structure and files via 'Use this template' button.
The easiest way to add a pull request template to your repository is by adding a file called pull_request_template.md in the root of your directory. It's a markdown file, so you can use any of the markdown that is available to you. More about markdown in the mastering markdown syntax guide.
On the other repositories you have to add this template repository as a remote.
git remote add template [URL of the template repo]
Then run git fetch to update the changes
git fetch --all
Then is possible to merge another branch from the new remote to your current one.
git merge template/[branch to merge]
https://help.github.com/en/articles/adding-a-remote
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With