Below are some branch names I use. The primary branch is usually called main. If the code is public and used by other developers then I’ll maintain a LTS version. When working to release a new stable version it’s helpful for it to have a specific branch. Some of these branches can be ephemeral while others may never be deleted.
This branch naming convention can be very useful when following semantic versioning.
name | examples | stable |
---|---|---|
main | ||
lts/v1.10.0 | lts/v1.10.1 lts/v1.10.2 | |
stable/v1.1.1 | stable/v1.2.0 stable/v1.22.4 | |
beta | ||
develop | ||
release/v1.0.1 | release/v1.3.0 release/v1.3.1 | |
bug/name-issue | bug/editor-22 bug/query-19 | |
hotfix/name-issue | hotfix/cve120-4 hotfix/crash-23 | |
feature/name-issue | feature/encrypt-data-45 feature/redo-handlers-73 |
- Green items indicate a stable branch
- Yellow items indicate a potentially unstable branch
- Red items indicate it is not stable
Renaming Git’s default branch
If you have Git version 2.28 or greater then you can change the default branch name.
git config --global init.defaultBranch main