-
Notifications
You must be signed in to change notification settings - Fork 79
Git Workflow
Sam Richard edited this page Jan 20, 2022
·
1 revision
The main
branch. The ultimate source of truth. All branches should derive from main
. Before starting a new branch, make sure your main
branch is up-to-date.
- Check out your
main
branch and update it with the latest changes on GitHub - Create a branch
- Make your changes in your branch
- Lint your files with prettier
npm run prettier
- Commit your changes
- Push your changes
- Make a pull request from your branch
While not required, we recommend the following branch naming conventions.
- A
feature
branch. Use afeature/<name>
branch when you want to work on a new feature for the site.<name>
should be a short description of the feature. - A
content
branch. Use acontent/<name>
branch when you want to work on new content for the site.<content>
should be a short description of the content. - A
bug
branch. Use abug/<id>
branch when you want to work on a reported issue.<id>
should be the GitHub issue id. - A
hotfix
branch. Use ahotfix/<name>
branch when you want to work on a critical issue.<name>
should be a short description of the issue.
General considerations.
- Use the PR description template configured for the project.
- Write a conforming title (see the Contributing guidelines)
- Use branches out of the
main
branch to create PRs. Avoid using branches of other branches. - Make sure to link the PR to the issues it solves. GitHub provides many options. Favor the use of the
resolves
keyword in the PR description that comes with the template. - After the PR is approved and the branch merged, make sure to remove the branch from the repository. This can be done from the PR’s detail page.
- Use ZenHub to fill all the extra information. Check the project management tools section for instructions on how to integrate GitHub and ZendHub.
- Connect the PR with an existing issue. This one is different from the linked issues connected using the regular GitHub process.
- Include as much information as possible. i.e. Epics, Labels, Releases, Milestones, etc.
The project uses Firebase to automatically generate staging links. When a new PR is created a and passes the relevant tests, a staging link with the changes will be added as a comment to the PR.