A battle-tested, general-purpose GitHub template repository designed to jumpstart any projectβfrom simple Docker images and bash scripts to complex JavaFX applications and Rust terrain generators.
This template eliminates the repetitive setup work for new repositories by providing a solid foundation of automation, linting, and development environment configuration. Whether you're starting a solo side project or a team collaboration, this template has you covered.
-
π€ Automated Repository Setup
- One-time automatic initialization on first push to
main - Cleans up template-specific files
- Syncs issue labels from the template repository
- Generates a starter README tailored to your project
- One-time automatic initialization on first push to
-
π Super-Linter with Auto-Fix
- Automated code quality checks on all pull requests
- Auto-fixes common formatting issues (JSON, Markdown, etc.)
- Prettier integration for consistent code style
- Runs only on changed files (efficient CI/CD)
-
π¦ Dev Container Support
- Pre-configured VS Code development container
- Alpine Linux base with bash and git
- Consistent development environment across machines
- Prettier extension pre-installed
-
π Comprehensive Templates
- Bug report template
- Feature request template
- Pull request template with checklist
- Branch naming validation workflow
-
π·οΈ Rich Label System
- Extensive label collection for issue and PR management
- Organized categories for types, priorities, statuses, and more
- Perfect for both team and personal project organization
-
Create a new repository from this template:
- Click the "Use this template" button at the top of this repository
- Choose a name for your new repository
- Select public or private visibility
- Click "Create repository from template"
-
Clone your new repository:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git cd YOUR-REPO-NAME -
Make your first commit and push to main:
git add . git commit -m "Initial commit" git push origin main
-
Watch the magic happen! π
- The
repository-setupworkflow will automatically run - Template-specific files will be removed (including this README)
- Labels will be synchronized from the template
- A new project-specific README will be generated
- Check the Actions tab to see the setup progress
- The
The automated setup workflow runs ONLY on the first push to main branch. Here's what it does:
- Removes
.github/workflows/repository-setup.yml(cleanup) - Removes the template
README.md(this file) - Deletes all default GitHub labels
- Clones the label set from the template repository
- Creates a new README with your repository's name and basic structure
After this first-time setup, the workflow will never run again, keeping your repository clean and ready for your project.
-
.devcontainer/- Dev container configurationDockerfile- Alpine Linux with bash, git, and a non-root userdevcontainer.json- Container settings and extensions
-
.vscode/- VS Code editor configurationsettings.json- Formatting, tab sizes, and Prettier setuptasks.json- Automated task to clean up old Git branches
-
.github/workflows/branch-name-validation.yml- Enforces branch naming conventionsrepository-setup.yml- One-time setup automation (auto-removed)super-linter.yml- Linting and auto-fixing workflow
-
.github/ISSUE_TEMPLATE/bug_report.md- Structured bug reportingfeature_request.md- Feature request template
-
.github/pull_request_template.md- PR template with checklist
.dockerignore- Docker build exclusions.gitattributes- Git line ending configuration.gitignore- Common patterns for environments, logs, and configs
The template enforces a category/slug naming pattern for branches:
Format: <category>/<slug>
Allowed categories:
feature- New featuresbug,fix- Bug fixeschore- Maintenance tasksdocs- Documentation updatestest,testing- Test additions/modificationsperformance- Performance improvementsrefactor- Code refactoringci-cd- CI/CD changesbuild- Build system changesrelease- Release preparationhotfix- Urgent production fixesexperiment- Experimental featurestask- General taskssecurity- Security fixesspecial- Special casesstatus- Status updates
Slug rules:
- 3-50 characters
- Lowercase letters and numbers only
- May include
-or_inside (but NOT at start or end) - Must start and end with alphanumeric characters
Valid examples:
feature/add-user-authentication
bug/fix-login-redirect
docs/update-api-docs
hotfix/critical-security-patch
refactor/cleanup-database-layerInvalid examples:
Feature/AddAuth # uppercase not allowed
feature/_private-method # starts with underscore
add-feature # missing category prefix
feature/x # slug too short (< 3 chars)To modify allowed categories, edit .github/workflows/branch-name-validation.yml and update the PATTERN regex.
The linter is configured in .github/workflows/super-linter.yml. Key settings:
VALIDATE_ALL_CODEBASE: false # Only lint changed files
FIX_MARKDOWN: true # Auto-fix markdown
FIX_JSON: true # Auto-fix JSONExcluded files (not linted):
.devcontainer/Dockerfile.github/pull_request_template.md.github/ISSUE_TEMPLATE/*.md.github/workflows/*.yml
To customize what gets linted or fixed, modify the environment variables in the workflow file.
Edit .devcontainer/Dockerfile to add tools for your project:
# Example: Add Node.js
RUN apk add --no-cache nodejs npm
# Example: Add Python
RUN apk add --no-cache python3 py3-pipUpdate .devcontainer/devcontainer.json to add VS Code extensions:
"extensions": [
"esbenp.prettier-vscode",
"ms-python.python",
"golang.go"
]After the initial setup, labels are cloned from the template repository. To customize:
- Edit labels directly in your repository's Issues β Labels section
- Or modify the source labels in the template repository and re-clone
Trigger: First push to main branch only (if: github.run_number == 1)
Actions:
- Removes template-specific files
- Clears default GitHub labels
- Clones label set from template
- Generates new README with repository name
- Commits changes as user "Vianpyro"
Trigger: Push to non-main branches or pull requests
Actions:
- Extracts branch name from GitHub context
- Validates against naming convention
- Fails with detailed error message if invalid
- Provides examples and guidance for fixing
Trigger: Push to main or pull request to any branch
Actions:
- Checks out code with full history
- Sets up Node.js for Prettier
- Installs and runs Prettier on all files
- Runs Super-Linter on changed files only
- Auto-commits fixes on PR branches (not on
main)
The template includes a task that automatically runs when you open the folder:
Delete Old Git Branches - Removes local branches whose remote counterparts have been deleted. Keeps your branch list clean after merged PRs.
To disable auto-run, edit .vscode/tasks.json and remove the runOptions section.
- Use labels extensively - The template provides a comprehensive label system for organizing issues and PRs
- Leverage PR templates - Fill out the checklist to ensure consistent review quality
- Enforce branch naming - The validation workflow helps maintain a clean branch structure
- Review auto-fixes - Super-Linter will commit formatting fixes automatically on PR branches
- Skip the ceremony if needed - Templates and checklists are guides, not requirements
- Disable workflows you don't need - Delete or modify workflow files in
.github/workflows/ - Customize the dev container - Add tools specific to your project type
- Use the label system - Even solo projects benefit from organization
Starting a new feature:
git checkout -b feature/amazing-new-thing
# ... make changes ...
git push origin feature/amazing-new-thing
# Create PR on GitHubFixing a bug:
git checkout -b bug/fix-critical-issue
# ... fix the bug ...
git push origin bug/fix-critical-issue
# Create PR on GitHubQuick hotfix:
git checkout -b hotfix/urgent-production-fix
# ... apply fix ...
git push origin hotfix/urgent-production-fix
# Create PR, get it merged quicklyAfter setup, customize the contributing guidelines in your new README. Consider including:
- Code style guidelines
- Testing requirements
- PR review process
- Communication channels
TODO: Choose a license for your project. Common options:
- MIT - Permissive, allows commercial use
- Apache 2.0 - Permissive with patent grant
- GPL v3 - Copyleft, requires derivative works to be open source
- BSD 3-Clause - Permissive with attribution requirement
- Unlicense - Public domain dedication
Add your chosen license to a LICENSE file and update your README.
Visit choosealicense.com for guidance.
This template will continue to evolve. To pull updates into existing repositories:
-
Add the template as a remote:
git remote add template https://github.com/Vianpyro/Template.git git fetch template
-
Cherry-pick specific updates:
git cherry-pick <commit-hash>
-
Or merge changes (may require conflict resolution):
git merge template/main --allow-unrelated-histories
- Ensure you pushed to the
mainbranch - Check the Actions tab for errors
- Verify the workflow file exists before the first push
- Review the error message for specific guidance
- Ensure branch name matches
category/slugformat - Check that slug is 3-50 characters and lowercase
- Review the linter output in the Actions tab
- Some issues may require manual fixes
- Consider excluding problematic files in the workflow config
- Ensure Docker is installed and running
- Verify the Remote-Containers extension is installed in VS Code
- Check Docker logs for build errors
- GitHub Actions Documentation
- VS Code Dev Containers
- Super-Linter Documentation
- Prettier Documentation
Ready to start your next project? Click "Use this template" and let the automation handle the boring stuff! π
This README will be automatically replaced after your first push to main. Make sure to customize your new README with project-specific information.