Simple Contribution Guidelines for Programmers
Use this simple guidelines to onboard programmers in your company. Adjust to the needs and nuances of your project. If you already have contribution guidelines for programmers in your project, review it against this one. Perhaps, you find some interesting points lacking in yours.
Replace values marked with ✏️ icon to yours.
- Clone project repository (✏️ link to project repository) to your local computer.
- Install project dependencies using
npm iTerminal command.
- Read documentation (✏️ link to documentation) and learn how to run the project on local — development mode, environment variables, database connection, tests, everything. Sometimes looking at NPM scripts in
package.jsonmight give you a lot of information really quick.
- Pick a task assigned to you in project management tool (✏️ link to Jira, Trello, Asana…).
- Checkout a new branch from the main branch (✏️ specify
If your task is a new feature, prepend your branch name with
feature/prefix. If it is a fix to an existing bug, prepend with
feature/migrate-from-typings-to-types). Use only lowercase letters for branch names.
-(hyphen character) shall be used to separate words. Try to name your branch using words from a task title in project management tool.
- Commit and push to your feature/hotfix branch often.
- Cover your work with test cases and fix any breakage caused by the new code.
- Run newly added source code through linter. Must do this before submitting the PR. It saves the reviewers a lot of time.
- Merge main branch into yours to examine how your changes works with latest changes of others.
- When ready, submit a PR.
- In PR description, clearly define what your changes do in the most shortest way. Ensure description contains a reference to your task in project management tool — a link or id to your task.
- Make any changes asked for by the reviewers and push the changes as new commits. For your PR to be approved, you need one reviewer "Looks Good To Me" (LGTM).
- After your PR was approved, merge it into the main branch squashing all its commits into one. Normally you will do this via Github or Bitbucket websites under PR page. However, it's also possible using
git merge --squashcommand or interactive rebase:
git rebase -i $(git merge-base --fork-point master)
- Delete the branch from remote.
- Mark your task as complete in project management tool.