When creating a new project from this template, ensure to take these steps immediately after provisioning.
- Template checklist
After checking out the new project and setting the origin
remote for git
, run the following command locally to
update link targets to the new Repository instead of the original template-core
Repository:
Note - this assumes that you are on macOS using GNU
sed
installed via Homebrew asgsed
. If you are running this on Linux, or otherwise have GNUsed
installed as a default, simply replacegsed
withsed
below prior to running this command:
REPO=$(sed -E 's@.*github\.com:(.+)\.git$@\1@g' <(git ls-remote --get-url origin)); \
find . \( -type d -name .git -prune \) -o -type f -print0 | \
xargs -0 gsed -i "s@andrewvaughan/template-core@${REPO}@g"
For the rest of setup, refer to this - now updated - document to have accurate links to references in future steps. For the cleanest results, hold off on committing and pushing these changes until all steps in this file are complete.
The GitHub template system has many limitations, only copying over files and, if selected, Branches from the parent Repository. As such, it's important to configure the Repository to the project standard prior to modifying any of the Repository files.
Visit the General Settings page for the Repository.
- CHECK
Require contributors to sign off on web-based commits
- CHECK
Discussions
- CHECK
Sponsorships
- UNCHECK
Allow merge commits
- CHECK
Always suggest updating pull request branches
- CHECK
Automatically delete head branches
- CHECK
Include Git LFS objects in archives
Visit the Rulesets page for the Repository.
In the project, visit the .github/.config/rulesets
and import each of the GitHub Rulesets
in the directory into the project:
- Branch Common Rules
- Branch Environment Rules
- Branch Release Patterns
- Tag Common Rules
- Tag Release Patterns
A manual workflow called Sync Labels
must trigger from the GitHub Actions page for this Repository to create the
Labels necessary for automation to function and for the Software Development Lifecycle. You must trigger this workflow
manually.
- Run the
Sync Labels
workflow for this project
- Enable
git lfs
for the project if, not already installed
git lfs install
- Add and/or remove any files or folders that don't apply to this project
Optional
- Remove all
.empty
filesfind . -type f -name '.empty' -delete
- Update
.gitattributes
and.editorconfig
file endings toCRLF
- Update all files to the new file ending in Command Prompt
for /R %f in (.*) do UNIX2DOS %f ...
for /R %f in (*.*) do UNIX2DOS %f ...
Several Licenses are available based on the privileges, conditions, and limitations for Licensees of the project. Each table lists Licenses in order from least-restrictive to most-restrictive in the sections, below.
- Remove the
template-core
Repository's defaultLICENSE
file
rm LICENSE
- Select the appropriate License using the tables, below, as a guide, and rename it to
LICENSE
- Delete all remaining
LICENSE.*
files
rm LICENSE.*
- Check that all dates and copyright owners are correct
- Update the
README.md
badge to show the correct License - Add the appropriate
LICENSE
boilerplate to theREADME.md
file, if applicable - Add the appropriate
LICENSE
boilerplate to any source files, if applicable
License File | Commercial Use | Distribution | Modification | Patent Use | Private Use |
---|---|---|---|---|---|
LICENSE.unlicense |
Yes | Yes | Yes | - | Yes |
LICENSE.mit |
Yes | Yes | Yes | - | Yes |
LICENSE.apache |
Yes | Yes | Yes | Yes | Yes |
LICENSE.gpl3 |
Yes | Yes | Yes | Yes | Yes |
LICENSE.proprietary |
- | - | - | - | - |
As described by:
Permission | Description |
---|---|
Commercial Use | This License grants use for commercial purpose, including derivatives |
Distribution | This License grants distribution of the licensed material |
Modification | This Licensed grants modification rights |
Patent Use | This License provides an express grant of patent rights from Contributors |
Private Use | This License grants modification rights in private |
License File | Disclose Source | License/Copyright Notice | Same License | State Changes |
---|---|---|---|---|
LICENSE.unlicense |
- | - | - | - |
LICENSE.mit |
- | Yes | - | - |
LICENSE.apache |
- | Yes | - | Yes |
LICENSE.gpl3 |
Yes | Yes | Yes | Yes |
LICENSE.proprietary |
- | - | - | - |
As described by:
Permission | Description |
---|---|
Disclose Source | Licensees must make source code available when distributing |
License/Copyright Notice | Licensees must include a copy of the License and copyright notice with the material |
Same License | Licensee must Release modifications under the same License when distributing the licensed material - in some cases the Licensee may use a similar or related License |
State Changes | Licensee must document changes made to the licensed material |
License File | Limited Liability | No Trademark | No Warranty |
---|---|---|---|
LICENSE.unlicense |
Yes | - | Yes |
LICENSE.mit |
Yes | - | Yes |
LICENSE.apache |
Yes | Yes | Yes |
LICENSE.gpl3 |
Yes | - | Yes |
LICENSE.proprietary |
- | - | - |
As described by:
Permission | Description |
---|---|
Limited Liability | This License includes a limitation of liability |
No Trademark | This License explicitly states that it doesn't grant trademark rights, even though Licenses without such a statement probably don't grant any implicit trademark rights |
No Warranty | This License explicitly states that it doesn't provide any warranty |
Each file in the template that has particular needs after copying the template has those elements marked with a special
TEMPLATE TODO
comment.
If using VSCode, the recommended extensions and the provided workspace settings provides a curated list of items that require attention and add a counter to the bottom status bar representing how many items remain.
If not using VSCode, search for all instances of this phrase and take the actions they state:
grep -r "TEMPLATE TODO" .
Delete the TEMPLATE TODO
comments in each file as you complete them.
- Add necessary dictionaries for the expected languages to
.config/linters/.cspell.json
# To list all available dictionaries
npx cspell trace -c .config/linters/.cspell.json --all ''
- Install the recommended extensions via the prompt when first opening the workspace, or with the following command:
make vscode
With everything else complete, there is only one step left:
- Delete this
_TEMPLATE_CHECKLIST.md
file
Once you have refined the template project for its purpose, the following steps are usually helpful:
- Update the
README.md
file to best suit the project - Prepare the
.vscode
folder, as described here - Prepare the
.devcontainer
folder, as described here - Update the
all
,build
, andtest-unit
targets in the Makefile folder - Add any specific dictionary configurations to
.config/dictionaries/project.txt
and.config/linters/vale/styles/Vocab/
- Customize the Issue and Pull Request templates
From there, it's a matter of getting started by creating new source code, tests, and build scripts to make your project a reality.
This template comes with the following standard folder structure:
Folder | Purpose |
---|---|
.build | All scripts and resources tied to deployment (for example, Docker Compose) |
.config | All configuration files for local development |
.devcontainer | DevContainer configurations (GitHub Docs, VSCode Docs, Reference) |
.github | All configuration files for GitHub |
.vscode | Applicable, shared configuration files for VSCode to boost initial productivity |
docs | All project documentation |
src | All project source code |
tests | All test source code |