I was wondering how GitHub templates differentiates from forks and why should I use them instead of forking a repository?
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
Most commonly, forks are used to either propose changes to someone else's project to which you do not have write access, or to use someone else's project as a starting point for your own idea. You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository.
It is a better option to fork before clone if the user is not declared as a contributor and it is a third-party repository (not of the organization). Forking is a concept while cloning is a process. Forking is just containing a separate copy of the repository and there is no command involved.
Branching is to create another line of development in the project without affecting the main branch or repository. Forking, on the other hand, is to make a clone of the repository on your GitHub account without affecting the main repository.
As far as I understood, you can't pull updates from templates the same way you can pull them from forks. You are unable to push changes to the forked repository as well.
Templates are intended to use a repository as-is, and to use it as a boilerplate to build for example a website. It's not meant to be up-to-date with the main repository.
Edit: Also you can't fork your own repositories on GitHub; you can however use your own templates.
These are included in the official docs as well link
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