New git guidelines: We have switched to Conventional Commits
Giving teams as much autonomy as possible is a good idea, but having some company-wide guidelines can also help. Those guidelines will help you when people switch teams, work on multiple products, or train new colleagues.
Discuss, decide, repeat
We recently discussed some technology-related topics with all software developers at visuellverstehen. One of the outcomes of this discussion is new git guidelines. After a short debate, we have officially switched to Conventional Commits.
It is fun to see all the latest commits following a new syntax. I am curious about what we will say about this change in six or twelve months. For sure we will discuss and decide again – for the better.
New git guidelines
Below you can find the November 2022 edition of our git guidelines.
Repositories
- Repositories should be named like this:
vvcode-name_of_project
Branches
- The main branch should be named
main - The people working on a product decide if they want to work with further branches
- If you need further branches, it is advisable, to add the number of the issue and a short title inside of a branch name, e. g.:
100-validation-errors101-basic-search102-german-translation103-live-deployment104-url-formatting
Commits
- We use the syntax from Conventional Commits
- Commit messages include one of the following prefixes:
fix:to fix bugsfeat:to introduce new featureschore:to make general changesci:to work on continuous integration/continuous deploymentrefactor:to improve existing source code
- Commit messages should be written in the present form
- Commit messages should be written in English
- Commit messages should start with a lowercase character
- It is advisable to add the issue number to a commit message
- Practical examples of commit messages:
fix: display validation errors properly, refs #100feat: implement basic search, refs #101chore: add correct german translation, refs #102ci: repair live deployment, refs #103refactor: unify URL formatting, refs #104
- If a commit is a work in progress, it should be marked as such:
fix: display validation errors properly (WIP), refs #100feat: implement basic search (WIP), refs #101chore: add correct german translation (WIP), refs #102ci: repair live deployment (WIP), refs #103refactor: unify URL formatting (WIP), refs #104