@@ -24,55 +24,88 @@ We love new ideas! Please create an issue with:
2424- Why this would be useful for the Revit community
2525- Any potential implementation considerations
2626
27- ### Pull Requests
27+ ### Git Flow Workflow
2828
29- 1 . ** Fork the repository**
30- ``` bash
31- git clone https://github.com/your-username/Sonny.git
32- cd Sonny
33- ```
29+ This project follows the ** Git Flow** branching model with the following branches:
3430
35- 2 . ** Initialize submodules**
36- ``` bash
37- git submodule update --init --recursive
38- ```
31+ - ** ` master ` ** : Production-ready code. Only stable, tested releases are merged here. This branch should always be deployable.
32+ - ** ` develop ` ** : Integration branch for features. All feature branches merge into this branch. This is the main development branch.
33+ - ** ` feature/* ` ** : Feature branches for new functionality. Created from and merged back into ` develop ` .
34+ - ** ` release/* ` ** : Release branches for preparing new production releases. Created from ` develop ` and merged into both ` master ` and ` develop ` .
35+ - ** ` hotfix/* ` ** : Hotfix branches for urgent production bug fixes. Created from ` master ` and merged into both ` master ` and ` develop ` .
3936
40- 3 . ** Create a feature branch**
41- ``` bash
42- git checkout -b feature/your-feature-name
43- ```
37+ #### Git Flow Diagram
4438
45- 4 . ** Make your changes**
46- - Write clean, readable code
47- - Follow the existing code style (see ` .editorconfig ` )
48- - Add XML documentation comments for public APIs
49- - Test your changes thoroughly
50- - Update documentation if needed
39+ ![ Git Flow Branching Model] ( assets/images/gitflow.png )
5140
52- 5 . ** Commit your changes**
53- ``` bash
54- git commit -m " Add: brief description of your changes"
55- ```
41+ * Visual representation of the Git Flow branching model showing how commits flow between master, develop, feature, release, and hotfix branches.*
5642
57- Use clear commit messages following this format:
58- - ` Add: ` for new features
59- - ` Fix: ` for bug fixes
60- - ` Update: ` for updates to existing features
61- - ` Refactor: ` for code refactoring
62- - ` Docs: ` for documentation changes
63- - ` Test: ` for test additions or changes
43+ #### Branch Usage Guidelines
6444
65- 6 . ** Push to your fork**
66- ``` bash
67- git push origin feature/your-feature-name
68- ```
45+ ** Feature Branches:**
46+ - Created from ` develop `
47+ - Used for developing new features
48+ - Merged back into ` develop ` via Pull Request
49+ - Naming convention: ` feature/feature-name ` (e.g., ` feature/add-new-tool ` )
6950
70- 7 . ** Create a Pull Request**
71- - Describe what your PR does
72- - Reference any related issues (use ` Closes #123 ` or ` Fixes #123 ` )
73- - Include screenshots if UI changes
74- - Ensure all tests pass
75- - Update CHANGELOG.md if applicable
51+ ** Release Branches:**
52+ - Created from ` develop ` when preparing a new release
53+ - Used for final bug fixes and release preparations
54+ - Merged into both ` master ` (with version tag) and ` develop `
55+ - Naming convention: ` release/version-number ` (e.g., ` release/v1.0.0 ` )
56+ - Only maintainers create release branches
57+
58+ ** Hotfix Branches:**
59+ - Created from ` master ` for urgent production fixes
60+ - Used for critical bug fixes that cannot wait for the next release
61+ - Merged into both ` master ` (with version tag) and ` develop `
62+ - Naming convention: ` hotfix/description ` (e.g., ` hotfix/critical-bug-fix ` )
63+ - Only maintainers create hotfix branches
64+
65+ ### Pull Requests
66+
67+ ** Workflow Overview:**
68+ 1 . Fork the repository and clone it locally
69+ 2 . Create a feature branch from ` develop ` (see Git Flow diagram above)
70+ 3 . Make your changes and commit them
71+ 4 . Push your feature branch to your fork
72+ 5 . Create a Pull Request targeting ` develop ` branch
73+
74+ ** Important Guidelines:**
75+ - ** Always create feature branches from ` develop ` ** , not from ` master `
76+ - ** Pull requests must target ` develop ` branch** (not ` master ` )
77+ - Only maintainers merge ` develop ` into ` master ` for releases
78+ - Keep your feature branch up to date with ` develop ` before creating PR
79+
80+ ** Commit Message Format:**
81+ Use clear commit messages following this format:
82+ - ` Add: ` for new features
83+ - ` Fix: ` for bug fixes
84+ - ` Update: ` for updates to existing features
85+ - ` Refactor: ` for code refactoring
86+ - ` Docs: ` for documentation changes
87+ - ` Test: ` for test additions or changes
88+
89+ ** When Creating a Pull Request:**
90+ - Describe what your PR does
91+ - Reference any related issues (use ` Closes #123 ` or ` Fixes #123 ` )
92+ - Include screenshots if UI changes
93+ - Ensure all tests pass
94+ - Update CHANGELOG.md if applicable
95+
96+ ### Release & Hotfix Branches (Maintainers Only)
97+
98+ ** Release Branches:**
99+ - Created from ` develop ` when preparing a new release
100+ - Used for final bug fixes and release preparations
101+ - Merged into both ` master ` (with version tag) and ` develop `
102+ - See Git Flow diagram above for visual workflow
103+
104+ ** Hotfix Branches:**
105+ - Created from ` master ` for urgent production bug fixes
106+ - Used for critical fixes that cannot wait for the next release
107+ - Merged into both ` master ` (with version tag) and ` develop `
108+ - See Git Flow diagram above for visual workflow
76109
77110## Code Style Guidelines
78111
@@ -128,11 +161,14 @@ public double FromInternalUnit(double value, ForgeTypeId displayUnit)
1281612 . Clone repository with submodules:
129162 ``` bash
130163 git clone --recursive https://github.com/your-username/Sonny.git
164+ cd Sonny
131165 ```
132166
133- 3 . Open solution in your IDE
167+ 3 . Checkout ` develop ` branch for development
168+
169+ 4 . Open solution in your IDE
134170
135- 4 . Build the project:
171+ 5 . Build the project:
136172 ``` bash
137173 ./.nuke/build.cmd
138174 ```
0 commit comments