We have a precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history.
Each commit message will consists of type and subject:
<type>|<...other_types>: <subject>
Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: gatsby config, gatsby browser, gatsby node, or gatsby ssr)
- chores: Add or Changes on packages or external dependencies
- ci: Changes to our CI configuration files and scripts (example scopes: Docker, nginx conf)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- text: Adding text or updating text only
- empty: Rare cases for re-deploying when deployment server is down
- revert: A commit reverts a previous commit
There are cases when you want to change the base branch because the PR that didn't used to have text changes is now having text changes, so, you need to convert base branch from master
to crowdin
. The command to do that is as follows:
git rebase --onto crowdin master your_branch_name
or vice versa from crowdin
to master
git rebase --onto master crowdin your_branch_name
There are two ways to get latest changes:
git pull upstream master|crowdin --rebase
or
git pull upstream master|crowdin
both of these will do the job. However, rebase won't add another commit to your PR where without rebase it will add commit history of merging the latest changes to your branch.
There are cases when other developers also work on translation (crowdin) branch, and get merged first. This way, your branch will get conflict of the extracted message.json. to fix this:
-
get the latest crowdin changes
git pull upstream crowdin
-
accept incoming change from crowdin
git checkout --theirs crowdin/messages.json
-
resolve other conflicts if any, or just commit your changes
-
push to your origin branch to update the PR