From the course: GitHub Administration Cert Prep
Demo: GitHub templates - GitHub Tutorial
From the course: GitHub Administration Cert Prep
Demo: GitHub templates
- [Instructor] Let's go ahead and create a new repository for GitHub based on a template. In this case, I'm going to look at the Microsoft Codespaces teaching template py, and you can see here this is a public template. What's nice about this is that it means that I could actually customize my own workflow based on this template. So what do I need to do to get started here? Well, I could just go ahead and click, Use This Template, and then select my repo here, and it would copy all of the files into this repository. Let's go ahead and do that. Let's call this mlops-template, because I'm going to use this to create my own template. And we can say mlops-template, and then I can go to Public, and then we can also include any branches if we wanted to. In this case, the main is just fine. Now, one of the things that I like to do when I'm creating my own scaffolding for a project is I like to use Make Files. And so one of the things that I would probably do to modify this is I would go through here and add a few different files. And we can even do this real quick. We can actually create them right from this interface. If I go through here and I say, Create, Make File, this could be one of the things that I added to the project. And the other thing I could do as well is if I wanted to customize the devcontainer and enhance it or make some changes to it, I could also do that as well. Now, what I'm going to do is I'm going to go to my Settings now and make this a template for other people. So go ahead and click Settings. And now if I go down here and I go to the settings for this repository, I can say template repository. What's nice about this is that I could then give this to students, or I could give this to other people in my workplace, and now they're going to be able to use this as well. And so if we go back here, you can see here that it says public. And now if I wanted to create a new project based on this template in the future, I would just select, Use This Template. There's some additional documentation from GitHub called Creating a Template Repository. And you can actually use this in the future to make changes if you'd like to, when you're making your own repository.