Skip to content

Latest commit

 

History

History
89 lines (73 loc) · 3.6 KB

README.md

File metadata and controls

89 lines (73 loc) · 3.6 KB

Repo Template

This repository is a very basic template for a new repository hosted on GitHub. It contains the following boilerplate:

  • CHANGELOG.md
  • LICENSE
  • README.md
  • GitHub CODEOWNERS
  • Code of Conduct
  • Contributing Guide
  • Security Guide
  • Empty dirs for GitHub Issue and PR templates
  • Empty dir for GitHub Actions workflows
  • Large .gitignore file

Usage

I highly recommened the GitHub CLI for interacting with the various GitHub APIs.

To create a new repository from this template, you can do the following:

$ gh repo create YOUR_GITHUB_USER/YOUR_GITHUB_REPO --description "A description of your repository" --template timoguin/repo-template --confirm

Since this is a very basic template, you will need to populate or modify some aspects of the repo contents after initial creation.

Here are the steps:

And here is a sed-based method example to help with some of the more basic search-and-replace tasks:

$ export NAME="Your Name"
$ export EMAIL="[email protected]"
$ export GITHUB_USER="YOUR_GITHUB_USER"
$ export GITHUB_REPO="YOUR_REPO"

# For OS X, use gsed. Otherwise you will get the error "invalid command code C".  See
# the below this code snippet.
alias sed=gsed

$ echo -e "# $GITHUB_REPO\n\nThis is my README, and I hope you will READ it." > README.md
$ sed -i "s/@timoguin/@$GITHUB_USER/; s/Tim O'Guin/$NAME/; s/[email protected]/$EMAIL/; s/timoguin\/repo-template/$GITHUB_USER\/$GITHUB_REPO/; s/2021 /$(date +'%Y') /" CHANGELOG.md LICENSE .github/CODEOWNERS .github/*.md

NOTE: if you are using OS X, you will need GNU Sed to support the -i flag for in-place file modifications.