Version Control
6 Degrees, employees, and projects utilize version control git to maintain code and its history. This enable multiple employees collaborate on one project and
enables the reversal and tracking of code changes.
Remote Platform
While version control does not require having a remote repository, all our code bases use GitHub as a platform of choice for maintaining code and collaboration.
Structure
Code is maintained in organizational profiles. For each client, company or set of projects, an organization name should be identified, and a GitHub organization shall be created. All code bases related to that organization or project shall be created and maintained inside the organization profile.
A dev team shall be created to include dev team members and that team should have control over the organization repos.
Naming Convention
Repos names should follow one of the below 3 naming conventions
language_framework_project_name_* optional sufficsex.py_flask_hex_converter_servicepy => Python flask => flask framework for python web server hex_converter => project name service => suffix, as this repo is for a microservice.url_of_websiteex.www.6degrees.com.sathis repo will contain the source code, and a GitHub action that will auto deploy intogh-pagesbranch.package_nameex. swarmapp-api a simple name for an npm package.
Repos Metadata
- Title
Same as repo name, no need to explain.
- Url
if the repo is for a website, or has a live demo, or a page describing it, the url property should be populated
- Description
Breif description of the content of the repo.
readme.mdfile Readme file should always be populated with a revised meaningful title, a longer description, license of choice, credits given to owners of source code utilized in the repo, screenshot of the project outpout if possible.
GitHub Actions
When dealing with static website creation through code, such as when using docusaurous or nuxtjs, a GitHub Action shall be created to automate the deployemnt and files creation for that repo into a gh-pages branch that will be linked to the url for that page or service.
Branching Stratgey
KISS (Keep it simple stupid) avoid branches unless for the below conditions:
- the branch is for
github-pagesversion to hold the build files, like this repo - the branch is to reserve an old major version of the project. i.e. You are upgrading to
version 2, make a branch and name itversion 1to hold the old version
Goal is to avoid merge conflicts resolution nightmare