Skip to content

Commit

Permalink
docs: update branch strategy (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
orangekame3 authored Dec 5, 2024
1 parent e8361d0 commit 7463f93
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions docs/development-flow.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@

# Development Flow

## Branch Strategy

As shown in the diagram below, the feature branches (`feature/xxx`) are branched off from the `main` branch for development. The `main` branch is the release branch.
As shown in the diagram below, the `develop` branch is branched off from the `main` branch, and feature branches (`feature/xxx`) are branched off from the `develop` branch for development. The `main` branch is the release branch, while the `develop` branch is for development.

The `develop` branch always maintains the latest merged code, so when performing hotfixes, branches are created from the `develop` branch for the necessary fixes.

```mermaid
gitGraph LR:
commit tag:"release-v1.0.0"
branch develop
commit
branch feature/xxx
commit
commit
checkout main
checkout develop
branch feature/yyy
commit
checkout main
checkout develop
merge feature/yyy
checkout feature/xxx
commit
checkout main
checkout develop
merge feature/xxx
commit tag:"release-v1.1.0"
checkout main
merge develop tag:"release-v1.1.0"
checkout develop
branch hotfix/zzz
commit
commit
checkout main
checkout develop
merge hotfix/zzz
commit tag:"release-v1.2.0"
checkout main
merge develop tag:"release-v1.2.0"
```

### Branch Naming
Expand All @@ -41,7 +45,7 @@ While there are no strict rules, the following naming conventions are recommende

## Conventional Commits

The commit messages should preferably follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) guidelines.
The commit messages should preferably follow the  [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) guidelines.

### Commit Message Format

Expand All @@ -56,7 +60,7 @@ Once configured, running `git commit` will display the contents of `.gitmessage`
```bash
git commit
# Overview (Uncomment one of the following templates)
#feat:
#feat:
# └ A new feature
#fix:
# └ A bug fix
Expand Down Expand Up @@ -88,13 +92,13 @@ docs: Update README.md
When creating a PR to the `main` branch, labels are automatically assigned based on the commit messages.
Below is the correspondence between prefixes and labels:

| Prefix | Label | Description |
|---|---|---|
|feat: | `feature` | Adding a new feature |
|fix: | `bugfix` | Bug fixes |
|docs: | `documentation` | Documentation only changes |
|style: | `style` | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
|refactor: | `refactor` | Code changes that neither fix a bug nor add a feature |
|test: | `test` | Adding or correcting existing tests |
|ci: | `ci` | Adding or updating CI configuration and scripts |
|chore: | `chore` | Minor changes or maintenance tasks |
| Prefix | Label | Description |
| --------- | --------------- | ------------------------------------------------------------------------------------------------------ |
| feat: | `feature` | Adding a new feature |
| fix: | `bugfix` | Bug fixes |
| docs: | `documentation` | Documentation only changes |
| style: | `style` | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
| refactor: | `refactor` | Code changes that neither fix a bug nor add a feature |
| test: | `test` | Adding or correcting existing tests |
| ci: | `ci` | Adding or updating CI configuration and scripts |
| chore: | `chore` | Minor changes or maintenance tasks |

0 comments on commit 7463f93

Please sign in to comment.