Skip to content

Commit 5c85381

Browse files
committed
Merge branch 'development'
2 parents bec4e04 + f92e19e commit 5c85381

File tree

4 files changed

+433
-14
lines changed

4 files changed

+433
-14
lines changed

.gitmessage

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# HyperAgent Commit Message Template
2+
3+
# Type: feat, fix, docs, style, refactor, test, chore
4+
# Scope: component or module (optional)
5+
# Subject: brief description (50 chars max)
6+
7+
# Body: detailed explanation (optional)
8+
# - What changed
9+
# - Why it changed
10+
# - How it changed
11+
12+
# Footer: references and breaking changes (optional)
13+
# Fixes #123
14+
# Breaking change: description
15+
16+
# Examples:
17+
# feat(workflow): add constructor argument generation
18+
# fix(deployment): resolve constructor argument validation issue
19+
# docs(readme): update prerequisites section
20+
# chore: update .gitignore for branch management
21+

BRANCH_SETUP_COMPLETE.md

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# Branch Setup Complete ✅
2+
3+
**Date**: November 18, 2025
4+
**Status**: Successfully Configured
5+
6+
## Summary
7+
8+
The HyperAgent repository has been successfully configured with a two-branch workflow:
9+
10+
### ✅ Branches Created
11+
12+
1. **`development`** (Default Branch)
13+
- Contains all files: source code, tests, scripts, documentation
14+
- Active development happens here
15+
- Pushed to: `origin/development`
16+
17+
2. **`main`** (Production Branch)
18+
- Contains production-ready code only
19+
- Excludes: `tests/`, `scripts/`, `docs/`, `GUIDE/`, `examples/`
20+
- Clean, minimal codebase for production
21+
- Pushed to: `origin/main`
22+
23+
## Files Created
24+
25+
### Configuration Files
26+
27+
-`.gitignore` - Enhanced with comprehensive ignore patterns
28+
-`.gitattributes` - Branch-specific file handling and line endings
29+
-`.gitmessage` - Commit message template
30+
31+
### Scripts
32+
33+
-`scripts/sync_main_branch.sh` - Linux/macOS/Git Bash sync script
34+
-`scripts/sync_main_branch.bat` - Windows sync script
35+
36+
### Documentation
37+
38+
-`BRANCH_WORKFLOW.md` - Complete branch workflow guide
39+
40+
## Current Branch Status
41+
42+
```
43+
* development [origin/development] - Default branch with all files
44+
main [origin/main] - Production branch (cleaned)
45+
```
46+
47+
## What's Excluded from Main Branch
48+
49+
The following are automatically removed from `main`:
50+
51+
-`tests/` - All test files
52+
-`scripts/` - Development scripts
53+
-`docs/` - Internal documentation
54+
-`GUIDE/` - Developer guides
55+
-`examples/` - Example files
56+
-`pytest.ini` - Test configuration
57+
-`.cursor/` - IDE files
58+
-`*.plan.md` - Planning documents
59+
60+
## What's Included in Main Branch
61+
62+
-`hyperagent/` - Production source code
63+
-`README.md` - User-facing documentation
64+
-`LICENSE` - License file
65+
-`requirements.txt` - Dependencies
66+
-`setup.py` - Package setup
67+
-`pyproject.toml` - Project configuration
68+
-`Dockerfile` - Production Docker image
69+
-`docker-compose.yml` - Production compose
70+
-`alembic/` - Database migrations
71+
-`templates/` - Contract templates
72+
-`config/` - Production configuration
73+
74+
## Next Steps
75+
76+
### 1. Set Default Branch on GitHub
77+
78+
1. Go to: https://github.com/JustineDevs/HyperAgent/settings/branches
79+
2. Under **Default branch**, select `development`
80+
3. Click **Update**
81+
82+
### 2. Protect Main Branch (Recommended)
83+
84+
1. Go to: https://github.com/JustineDevs/HyperAgent/settings/branches
85+
2. Click **Add rule** for `main` branch
86+
3. Enable:
87+
- ✅ Require pull request reviews
88+
- ✅ Require status checks
89+
- ✅ Include administrators
90+
91+
### 3. Daily Development Workflow
92+
93+
```bash
94+
# Always work on development branch
95+
git checkout development
96+
git pull origin development
97+
98+
# Create feature branch
99+
git checkout -b feature/your-feature
100+
101+
# Make changes, commit, push
102+
git add .
103+
git commit -m "feat: your feature"
104+
git push origin feature/your-feature
105+
106+
# Create PR targeting development branch
107+
```
108+
109+
### 4. Production Release Workflow
110+
111+
```bash
112+
# Sync main from development
113+
bash scripts/sync_main_branch.sh
114+
115+
# Review changes
116+
git log --oneline -5
117+
118+
# Push to remote
119+
git push origin main
120+
121+
# Switch back to development
122+
git checkout development
123+
```
124+
125+
## Verification
126+
127+
### Check Branch Status
128+
129+
```bash
130+
# List all branches
131+
git branch -vv
132+
133+
# Check current branch
134+
git branch --show-current
135+
136+
# View branch differences
137+
git diff development..main --stat
138+
```
139+
140+
### Verify Main Branch is Clean
141+
142+
```bash
143+
git checkout main
144+
# Should NOT see: tests/, scripts/, docs/, GUIDE/, examples/
145+
ls -la
146+
147+
git checkout development
148+
```
149+
150+
## Important Notes
151+
152+
1. **Never commit directly to `main`** - Always use the sync script
153+
2. **Always work on `development`** - This is the default branch
154+
3. **Use feature branches** - Create branches from `development` for features
155+
4. **Sync `main` only for releases** - Don't sync after every commit
156+
5. **Review before pushing `main`** - Always review changes before production release
157+
158+
## Troubleshooting
159+
160+
### If sync script fails:
161+
162+
```bash
163+
# Manual sync
164+
git checkout development
165+
git checkout main
166+
git merge development
167+
rm -rf tests/ scripts/ docs/ GUIDE/ examples/ pytest.ini
168+
git add -A
169+
git commit -m "chore: remove development files"
170+
```
171+
172+
### If you need to reset main:
173+
174+
```bash
175+
git checkout development
176+
git branch -D main
177+
git checkout -b main
178+
bash scripts/sync_main_branch.sh
179+
```
180+
181+
## Success Indicators
182+
183+
✅ Both branches exist and are pushed to remote
184+
`development` contains all files
185+
`main` excludes development files
186+
✅ Sync scripts are available in `development` branch
187+
`.gitignore` properly configured
188+
✅ Branch workflow documented
189+
190+
---
191+
192+
**Setup completed successfully!** 🎉
193+

0 commit comments

Comments
 (0)