GitHub Template Features
GitHub Template Repository Features
Section titled “GitHub Template Repository Features”What copies when someone clicks “Use this template” — and what doesn’t.
This reference covers every category of GitHub repository configuration, whether it transfers to new repositories created from templates, and workarounds for items that don’t copy.
Source: Creating a repository from a template · Creating a template repository
1. Repository Files and Structure
Section titled “1. Repository Files and Structure”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| All files and folders | Yes | N/A | Creating a repository from a template |
| Hidden files (.gitignore, .github/, etc.) | Yes | N/A | Creating a template repository |
| Default branch | Yes | N/A | Creating a template repository |
| All branches | Optional | User selects “Include all branches” during creation | Creating a repository from a template |
| Git commit history | No | N/A — starts with single commit | Creating a repository from a template |
| Git LFS files | No | N/A — template restriction | Creating a template repository |
2. Branch Protection Rules
Section titled “2. Branch Protection Rules”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Branch protection rules | No | N/A — UI/API only | Managing a branch protection rule |
| Repository rulesets | No | Can export/import as JSON | Managing rulesets for a repository |
| Organization-level rulesets | N/A | Apply automatically to all org repos | Managing rulesets for repositories in your organization |
Note: There is no native
.github/settings.ymlin GitHub. That is a third-party tool (Probot Settings App).
3. Issues, PRs, and Templates
Section titled “3. Issues, PRs, and Templates”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Issue templates | Yes | .github/ISSUE_TEMPLATE/*.md or .yml | Configuring issue templates |
| Issue forms config | Yes | .github/ISSUE_TEMPLATE/config.yml | Syntax for issue forms |
| PR templates | Yes | .github/PULL_REQUEST_TEMPLATE.md | Creating a PR template |
| Existing issues | No | N/A — data, not files | Creating a repository from a template |
| Existing pull requests | No | N/A — data, not files | Creating a repository from a template |
4. Security Settings
Section titled “4. Security Settings”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| SECURITY.md | Yes | SECURITY.md, .github/SECURITY.md, or docs/SECURITY.md | Adding a security policy |
| Dependabot config | Yes | .github/dependabot.yml | Dependabot configuration options |
| Secret scanning config | Yes | .github/secret_scanning.yml | Enabling secret scanning |
| Code scanning workflows | Yes | .github/workflows/quality-gates.yml | Configuring code scanning |
| Security feature toggles | No | UI/API settings only | Managing security settings |
| Secret scanning enabled | No | UI/API settings only | Enabling secret scanning |
| Dependabot alerts enabled | No | UI/API settings only | About Dependabot security updates |
Security configuration files copy. Security feature toggles (enabled/disabled) do not.
5. Community Health Files
Section titled “5. Community Health Files”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| CODE_OF_CONDUCT.md | Yes | Root, .github/, or docs/ | Adding a code of conduct |
| CONTRIBUTING.md | Yes | Root, .github/, or docs/ | Default community health files |
| SUPPORT.md | Yes | Root, .github/, or docs/ | Default community health files |
| GOVERNANCE.md | Yes | Root, .github/, or docs/ | Default community health files |
| FUNDING.yml | Yes | .github/FUNDING.yml | Displaying a sponsor button |
| Org-level defaults | N/A | Public .github repo in org | Default community health files |
6. Development Environment
Section titled “6. Development Environment”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Dev container config | Yes | .devcontainer/devcontainer.json | Introduction to dev containers |
| Dev container directory | Yes | .devcontainer/ | Adding a dev container configuration |
| EditorConfig | Yes | .editorconfig | N/A (standard file) |
| VS Code settings | Yes | .vscode/settings.json | N/A (standard directory) |
| VS Code extensions | Yes | .vscode/extensions.json | N/A (standard directory) |
7. GitHub Codespaces
Section titled “7. GitHub Codespaces”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Dev container config | Yes | .devcontainer/devcontainer.json | Template repos for Codespaces |
| Lifecycle scripts | Yes | Referenced in devcontainer.json | Introduction to dev containers |
| Port forwarding config | Yes | portsAttributes in devcontainer.json | Template repos for Codespaces |
| Auto-open files | Yes | customizations.codespaces.openFiles in devcontainer.json | Template repos for Codespaces |
| Prebuild configuration | No | Repository settings | About Codespaces prebuilds |
| Codespaces secrets | No | Repository/Org settings | Managing development environment secrets |
8. GitHub Actions
Section titled “8. GitHub Actions”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Workflow files | Yes | .github/workflows/*.yml | Workflow syntax |
| Workflow permissions (in file) | Yes | permissions: key in workflow files | Workflow syntax |
| Composite action definitions | Yes | action.yml | GitHub Actions |
| Actions secrets | No | Settings > Secrets and variables | Using secrets in GitHub Actions |
| Actions variables | No | Settings > Secrets and variables | Using secrets in GitHub Actions |
| Environment configurations | No | Settings > Environments | Using secrets in GitHub Actions |
| Default workflow permissions | No | Settings > Actions > General | Managing Actions settings |
| OIDC trust policies | No | External provider config | Configuring OIDC in AWS |
9. GitHub Copilot
Section titled “9. GitHub Copilot”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Repository custom instructions | Yes | .github/copilot-instructions.md | Custom instructions for Copilot |
| Path-specific instructions | Yes | .github/instructions/*.instructions.md | Custom instructions for Copilot |
| Reusable prompts | Yes | .github/prompts/*.prompt.md | Custom instructions for Copilot |
| Agent instructions | Yes | AGENTS.md (anywhere in repo) | Custom instructions for Copilot |
| Claude Code instructions | Yes | CLAUDE.md | Custom instructions for Copilot |
| Copilot setup steps | Yes | .github/workflows/copilot-setup-steps.yml | Customize agent environment |
| ”Jumpstart with Copilot” prompt | No | UI feature during creation only | Creating templates |
10. Integrations and Apps
Section titled “10. Integrations and Apps”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| GitHub App installations | No | Can select during creation | Installing GitHub Apps |
| Webhook configurations | No | Must reconfigure manually | Creating webhooks |
| Probot settings | Yes (file) | .github/settings.yml | Probot settings |
11. Labels and Milestones
Section titled “11. Labels and Milestones”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Repository labels | No | .github/settings.yml (probot) or labels.json (label-sync) | Managing labels |
| Milestones | No | .github/settings.yml (probot) | About milestones |
| Default labels | No | New repo gets GitHub’s built-in defaults | Managing labels |
Workaround: Include a
.github/settings.ymlfor Probot settings or alabels.jsonfor github-label-sync.
12. GitHub Pages
Section titled “12. GitHub Pages”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| Pages settings (enabled/source) | No | Must enable in Settings > Pages | Configuring publishing source |
| gh-pages branch | Optional | Included if “Include all branches” selected | Creating a repository from a template |
| CNAME file | Yes (file) | CNAME in repo root or gh-pages branch | Managing a custom domain |
| Custom domain settings | No | Repository settings | Managing a custom domain |
13. Packages and Releases
Section titled “13. Packages and Releases”| Item | Copies? | Configuration File | Docs |
|---|---|---|---|
| GitHub Packages | No | N/A | Introduction to GitHub Packages |
| Releases | No | N/A | About releases |
| Git tags | No | N/A — history doesn’t copy | Viewing releases and tags |
| Container images | No | N/A | Working with Container registry |
| Release assets/binaries | No | N/A | About releases |
What Does NOT Copy — Complete Summary
Section titled “What Does NOT Copy — Complete Summary”| Item | Category | Workaround |
|---|---|---|
| Git commit history | Core Git | None — templates start fresh |
| Git tags | Core Git | Recreate manually or via automation |
| Git LFS files | Core Git | None — template restriction |
| Branch relationships | Core Git | Branches have unrelated histories |
| Stars / Watchers / Forks | Social | None — starts at zero |
| Issues | Project Management | Migrate via GitHub API |
| Pull requests | Project Management | Migrate via GitHub API |
| Discussions | Project Management | Recreate manually |
| Projects (classic & new) | Project Management | Use project templates separately |
| Wiki pages | Documentation | Clone wiki git repo separately |
| Releases | Distribution | Recreate after establishing tags |
| GitHub Packages | Distribution | Republish |
| Container images | Distribution | Rebuild and push |
| Labels | Issue Tracking | .github/settings.yml + probot or labels.json + label-sync |
| Milestones | Issue Tracking | .github/settings.yml + probot |
| Branch protection rules | Security | Org-level rulesets or export/import JSON |
| Repository rulesets | Security | Export/import JSON |
| Security feature toggles | Security | Enable via API or org-level defaults |
| Webhooks | Integrations | Reconfigure manually or via API |
| GitHub App installations | Integrations | Select during creation or install after |
| Actions secrets | CI/CD | Reconfigure in Settings > Secrets |
| Actions variables | CI/CD | Reconfigure in Settings > Secrets |
| Environments | CI/CD | Reconfigure in Settings > Environments |
| Deploy keys | CI/CD | Regenerate and reconfigure |
| OIDC trust policies | CI/CD | Reconfigure in cloud provider |
| Pages settings | Publishing | Enable in Settings > Pages |
| Custom domain (Pages) | Publishing | CNAME file copies; settings don’t |
| Prebuild configuration | Codespaces | Reconfigure in repo settings |
| Codespaces secrets | Codespaces | Reconfigure in repo/org settings |
| Collaborators / Teams | Permissions | Add manually or inherit from org |
| Default workflow permissions | Settings | Reconfigure in Settings > Actions |
| Merge strategy settings | Settings | .github/settings.yml + probot |
| Repository topics | Metadata | Add manually or via API |
| Social preview image | Metadata | Upload in Settings |
| About description | Metadata | Set manually |
| ”Jumpstart” Copilot prompt | Copilot | UI-only feature during creation |
The Rule
Section titled “The Rule”Files copy. Settings don’t.
If it lives in a file committed to the repository, it copies. If it’s a toggle, secret, or configuration stored in GitHub’s UI/API, it does not.