This is a boilerplate you can use to have your repo set with my best practices: a README, git workflows, necessary tools, dependencies, file structure etc.
You can create a repo out of this template.
Otherwise for a repo you've already started; here's a simple command to run at the root of your repository. (Please, ensure you commit your code before doing so. By that I mean; nothing should be in the staging area of git before running this so that you can much more easily decide which changes you are pulling in)
git clone https://github.com/NdagiStanley/repo-boiler-plate/.git && rm -rf repo-boiler-plate.git && cp -r repo-boiler-plate/. . && rm -rf repo-boiler-plate
Workflows:
main
(Simple solo project)main - dev
(Low complexity project with collaborators)main - staging - develop
(Standard project)main - staging - develop - feature-review-...
(Highly complex project)
Branch naming conventions:
task/...
fix/...
orfx-..
feat/...
orft-..
Or use branch names generated by your Project Management tool or issue tracker of choice.
A bad workman blames his tools!
Nonetheless, I advocate for "build your tooling so that it in hand builds you".
Below is my tooling. You can use it as is or modify it to suit your needs.
Contained herein are Markdown badges. These badges (seen when you collapse the sections below) are corresponding with the tooling needed. Upon cloning the repo you simply edit the service's username and repo-name or project-name and where applicable, the branch-name.
Continuous Integration with AppVeyor, CircleCI, GitHub actions, Netlify, SemaphoreCI etc.
-
Repo: electron-bot/electron
-
Repo: github/hub
-
Repo: NdagiStanley/lumen | Deployment - My old (now defunct) web profile
-
Repo: NdagiStanley/vue-django
Code quality analysis with Code Climate
Licensing
-
Repo: NdagiStanley/repo-boiler-plate (this repo)
Containerization with Docker
-
Repo: NdagiStanley/vue-django | In DockerHub: stanmd/vue-django
-
Repo: docker-library/postgres | In DockerHub: postgres
Documentation on Read the Docs
-
Repo: psf/black
In general, SemVer - Semantic Versioning should be adhered to
-
Repo: NdagiStanley/lifebuoy
Python packages on PyPI
-
Repo: amos-o/pipexec
-
Repo: psf/black
Packaging in NPM
-
Repo: vuejs/vue
-
Repo: http-party/http-server | In NPM: http-server
Packaging in VS Marketplace
-
Repo: NdagiStanley/lifebuoy
Dependencies across different language stacks
I use Dependabot, David DM, Libraries and Requires
-
Dependabot
-
Repo: NdagiStanley/codango
-
-
NPM dependencies with David DM
-
Repo: vuejs/vue
-
-
OpenSource libraries with Libraries
-
Repo: NdagiStanley/vue-django
-
-
requires.io is no longer active. It was acquired by Mend.io (formerly WhiteSource) and is now part of their product offering.
Vulnerabilities on Snyk
-
Repo: NdagiStanley/vue-django
curl https://raw.githubusercontent.com/NdagiStanley/repo-boiler-plate/main/.editorconfig > .editorconfig
curl https://raw.githubusercontent.com/NdagiStanley/repo-boiler-plate/main/netlify.toml > netlify.toml
touch cspell-wordlist.txt && curl https://raw.githubusercontent.com/NdagiStanley/repo-boiler-plate/main/cspell.json > cspell.json
-
.circleci/config.yml
file for CircleCI located at root of your repository -
.dependabot/config.yml
file for Dependabot located at root of your repository (on the default branch) -
.editorconfig
file, located at the root of the repo. Used to help contributors define and maintain consistent coding styles between different editors and IDEs -
.gitignore
file. Works with my .gitignore_global file.Speaking of
.gitignore
, find the default.gitignore
files here. For example, the extensive.gitignore
for Python projects is at https://github.com/github/gitignore/blob/main/Python.gitignore, hence: (Others:Node
,Go
,Rust
,Ruby
in place ofPython
in the script)curl https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore > .gitignore
References:
- All matters Git: Atlassian, Git SCM
- Licenses: Choose a license
- For badges/ shields: shields.io, badgen.net
- GitHub