Skip to content

Commit 71d2d46

Browse files
Merge pull request #6 from rocky-linux/feature/add-branch-guidelines
2 parents 92cf42b + 2f6baa1 commit 71d2d46

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Thank you for your interest in contributing to asknot-rocky! This guide will hel
88
- [Getting Started](#getting-started)
99
- [Development Setup](#development-setup)
1010
- [Making Changes](#making-changes)
11+
- [Branch Management Guidelines](#branch-management-guidelines)
1112
- [Submitting Changes](#submitting-changes)
1213
- [Code Style](#code-style)
1314
- [Testing](#testing)
@@ -59,6 +60,48 @@ By participating in this project, you are expected to uphold our [Code of Conduc
5960
npm run test # Run tests
6061
```
6162

63+
## Branch Management Guidelines
64+
65+
We follow a strict branch management policy to maintain code quality and project organization:
66+
67+
1. **Never Commit Directly to Main**
68+
69+
- All changes must go through feature branches
70+
- Direct commits to the main branch are prohibited
71+
- Main branch is protected and requires pull request reviews
72+
73+
2. **Feature Branch Naming Convention**
74+
75+
- Use the following prefixes based on the type of change:
76+
- `feature/` - For new features or enhancements
77+
- `fix/` - For bug fixes
78+
- `docs/` - For documentation updates
79+
- `refactor/` - For code refactoring
80+
- `test/` - For adding or updating tests
81+
- `chore/` - For maintenance tasks
82+
- Follow the prefix with a descriptive name using kebab-case
83+
- Examples:
84+
```
85+
feature/add-dark-mode
86+
fix/language-selector-bug
87+
docs/update-readme
88+
refactor/question-tree-logic
89+
test/add-i18n-tests
90+
chore/update-dependencies
91+
```
92+
93+
3. **Branch Lifecycle**
94+
95+
- Create branches from the latest main
96+
- Keep branches focused and single-purpose
97+
- Delete branches after merging
98+
- Regularly update feature branches with changes from main
99+
100+
4. **Branch Hygiene**
101+
- Keep branches short-lived (ideally less than a week)
102+
- Regularly rebase long-running branches on main
103+
- Clean up stale branches that are no longer needed
104+
62105
## Submitting Changes
63106
64107
1. Commit your changes with a clear and descriptive commit message

0 commit comments

Comments
 (0)