| by Arround The Web | No comments

GitHub Repository Templates

When you are working on any project, it is challenging for developers to start from scratch. It is scary for authors to view blank pages, as well as blank canvases for painters. Software developers are in a similar situation when they are tried to setting up projects on GitHub. The solution to this issue is repository templates.

This study will discuss what is GitHub repository, GitHub repository templates and how to create Template Repository.

What is GitHub Repository?

A repository keeps all user’s project files and their revision history. Users can monitor the progress of their projects within the repository. They can provide collaboration authentications to other members in user-owned repositories and also work on it as well. If the repository is controlled by an organization or company, they may provide permission to members of that organization and company to collaborate on it.

GitHub has multiple special repositories. For instance, we will create a repository that matches our username, then add a new README file and license file to it, and the whole data in that file will be visible on our GitHub profile.

What are GitHub Repository Templates?

The repository template is a well-known feature of GitHub and was released in June 2019. It makes working more efficient with GitHub and enhances functionality. A repository template allows the programmers to mark a repository as a template, which they can utilize later for creating new repositories having all of the template repository code files, folders, and configuration. The usage of a template repository is beneficial when we want to create the same projects several times in a large team.

How to Create a Template Repository?

Creating a template repository is a really simple procedure, the user can create a new template repository or they can also mark any existing repository as a template repository with the permissions of the admin. To do so, follow the below-provided steps.

Step 1: Open GitHub Repo Settings

First, open up the GitHub repo, click on the “three-dots” and then hit the “Settings” option:

Step 2: Rename Repo Name

Next, specify the new name for the existing repository, then mark the “Template repository” checkbox, and click on the “Rename” button:

Upon doing so, a template repository will be created. Now, check out the below section to create the repository from the template.

How to Create Repository from a Template?

By utilizing the same directory structure and files as a current repository, we can generate a new repository. To try this procedure on your GitHub account, follow the provided instructions.

Step 1: UseTemplate

After creating a new template repository, go back to the repository main page and click on the “Use this template” button:

Step 2: Specify Repo Name

Place the repo name in the required fields and select the “Public” option which indicates that this repo will be visible to everyone:

Step 3: Create Repository from Template

Next, mark the “Include all branches” checkbox, which will copy all the branches from “GitUser0422/demo_1”, and click on the “Create repository from template” button.

The below snippet indicates that we have successfully created a repository from a template.

We have discussed the GitHub repository template in detail and provided the method of creating the template repository.

Conclusion

The repository template is a well-known feature of GitHub which makes working more efficient with GitHub and enhances functionality. The repository template allows the programmers to mark a repository as a template, which they can utilize later for creating new repositories having all of the template repository code files, folders, and configuration. This study demonstrated what is GitHub repository and GitHub repository templates.

Share Button

Source: linuxhint.com

Leave a Reply