Naming and labeling conventions
November 17, 2022 ยท View on GitHub
Naming conventions
How to name a branch
We use feature branches for development. Our best practice is to use the "my-github-username" prefix for each branch and to split words with the low line, e.g.:
githubuser/my_feature_branch
How to name issues, commits and pull requests
We have been using GitHub for a while, and now we have a couple of tips for naming issues, commits and pull requests ( PRs). You are welcome to stick to them too ๐
Our favorite recipes are:
issue title = feature request or bug description + issue ID
commit message = PR title = fix description + issue ID + (PR number)
How to insert the issue ID into the commit message and the PR title?
โ Manually.
How to append the PR number to the PR title?
โ It appends automatically.
How to insert the PR number into the commit message?
โ Push the feature branch + Create pull request on GitHub and then โ
- The preferred and the easiest flow:
Squash and merge on GitHub โ the PR number automatically appends to the resulting commit message - The flow for advanced users:
(a) squash the commits locally โ insert the PR number in parentheses (!) manually into the resulting commit message + Force Push the resulting commit โ Rebase and merge on GitHub
or
(b) change the commit message locally โ insert the PR number in parentheses (!) manually + Force Push the commit โ Rebase and merge on GitHub
Labeling conventions
To choose the proper labels for your issue or PR, refer to the Label usage guidelines.