This repository contains project templates—each template is in its own branch.
The following project templates are available:
- docs
-
an Asciidoc project setup
- go-lang
-
a Go project setup
- html-css-js
-
an HTML/CSS/JS project setup
- latex
-
a LaTeX project setup
- rust-lang
-
a Rust project setup
- swift-lang
-
a Swift project setup
|
All branches of this repository will be force-pushed to—this is unfortunately necessary so that using this template project is easy. |
-
Install GitHub CLI.
-
Initialize a new repository from this template repository:
$ gh repo create my-project --clone --template=sdavids/sdavids-project-template --private --include-all-branches $ cd my-project
Alternatively, you can use the following two shell functions:
-
Browse the available project templates:
$ git ls-remote --quiet --branches origin | awk '{print $2}' | cut -d '/' -f3 | grep -v main ... go-lang ...
💡Use a graphical Git tool for this step.
-
Cherry-pick the single commit from the appropriate branch to set up a project (e.g.
go-lang
):$ git cherry-pick --no-commit --strategy-option=theirs $(git rev-parse origin/go-lang) $ git commit --amend --no-edit $ git push --force-with-lease
💡Use a graphical Git tool for this step if you want more control over the cherry-pick.
-
Remove the unnecessary branches:
$ scripts/git_delete_branches.sh
Afterward keep or delete the script:
$ rm scripts/git_delete_branches.sh
-
Install the development environment setup.
-
Initialize the Git hooks:
$ git config core.hooksPath .githooks
-
Set the ignore-revs-file:
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
-
Do the TODOs; delete the file afterward:
$ rm TODO
-
Amend the initial commit and push to origin:
$ git commit --amend --no-edit $ git push --force-with-lease
-
Cleanup your local Git repository:
$ scripts/git_cleanup.sh -e now
-
Your project is ready to go 🎉
Apache License, Version 2.0 (Apache-2.0.txt or www.apache.org/licenses/LICENSE-2.0).
We abide by the Contributor Covenant, Version 2.1 and ask that you do as well.
For more information, please see Code of Conduct.
❗
|
After initializing this repository you need to install the Git hooks via: $ git config core.hooksPath .githooks And configure the ignore-revs-file: $ git config blame.ignoreRevsFile .git-blame-ignore-revs |