-
Notifications
You must be signed in to change notification settings - Fork 0
Collaboration
This document provides an overview of GitHub collaboration we should try implementing moving forward for legibility and coherence with regards to our development lifecycle.
If you have to create a repository, use the following naming conventions:
- Use lower case letters.
- Use dashes instead of white spaces or underscores.
- Be specific. You may find you have to differentiate between similar ideas later. As an example use: "sales-rest-service" instead of "service" or "rest-service".
Please keep in mind that you have to write a README.md file about your project and upload it to your repository.
Here are 2 useful guides that explain some best practices about README files:
- https://www.freecodecamp.org/news/how-to-write-a-good-readme-file/
- https://bulldogjob.com/news/449-how-to-write-a-good-readme-for-your-github-projec
Collaborating on the README file is encouraged.
Git is a version control tool. Working with version control means that you can revert back to previous stages of the code at any time, as well as having an history of the changes made to the repository. Here you can find a a git cheat sheet with some of the commands available, but you will probably only frequently use:
git add
git commit
git push
git pull
git checkout
When collaborating on a repository, a general rule is not to push changes directly to the main branch. To add changes to a repository, you have to:
- Create a new branch.
- Commit your changes to the newly created branch.
- Create a pull request in GitHub to merge the changes in the main branch or another branch.
- Wait for the review of at least 1 of your teammates.
- Merge the changes.
For a better overview of pull requests and collaboration on GitHub, you can take a look at this YouTube video.
For every piece of code that you push to GitHub you have to write a commit message. Keep the commit message short and informative. You can find a quick overview of how to write commits in this YouTube video, or the full guidelines here.
The full commit described by conventional commits looks like this:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
- The available types that you can use are:
๐ง fix - fixing a feature that a user accesses/sees
๐ feat - adding a new feature that a user accesses/sees
โ build -changes that affect the build system of the production code or external dependencies (example scopes: gulp, broccoli, npm)
๐ก๏ธ chore - changes in support or grunt tasks; no production code change
๐ perf - changes that improve performance
๐ ci - work relating to the ci/cd pipeline
๐ infra - work relating to the delivery infrastructure
๐ docs - changes to the documentation
๐ธ style - changes in the codeโs formatting and general style that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
๐งน refactor - cleaning the code after testing codebase, it neither fixes a bug nor adds a feature
๐งช test - adding missing tests or correcting existing tests in the codebase
โฎ revert - reverts a previous commit
- The scope (not required) can be used to add information about the type, e.g.:
style(homepage): add padding
-
The description is a short message written in imperative.
-
Body and footer are really not required, but if you want to write them you can find their specifications in the full guidelines online.
โ Basically, we should avoid commit messages such as 'fix' or 'now it works' at all costs.