summaryrefslogtreecommitdiffstats
path: root/docs/policies/GIT-WORKFLOW.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-30 08:53:35 +0200
committerDanilo M. <danix@danix.xyz>2026-04-30 08:53:35 +0200
commitc711d02fcbdab312956236729693113128a436fd (patch)
tree1bca477bac49cb33b64300dad2dad954d34c9f03 /docs/policies/GIT-WORKFLOW.md
parent3bd7e523a941c8fcdd9a0385ba232134b5e00b5b (diff)
parent1355c69b3c5746fd34aa9d33ed52d8739cc2da5f (diff)
downloaddanixxyz-c711d02fcbdab312956236729693113128a436fd.tar.gz
danixxyz-c711d02fcbdab312956236729693113128a436fd.zip
Merge production branch workflow docs into masterrelease_30042026-0853
Diffstat (limited to 'docs/policies/GIT-WORKFLOW.md')
-rw-r--r--docs/policies/GIT-WORKFLOW.md179
1 files changed, 71 insertions, 108 deletions
diff --git a/docs/policies/GIT-WORKFLOW.md b/docs/policies/GIT-WORKFLOW.md
index b421f83..ed07de8 100644
--- a/docs/policies/GIT-WORKFLOW.md
+++ b/docs/policies/GIT-WORKFLOW.md
@@ -1,68 +1,64 @@
-# Git Workflow Guide — Weekly Branching
+# Git Workflow Guide
-**Effective Date:** 2026-04-16
-**Policy:** Each week of implementation work starts on a new feature branch for code review and safe integration.
+**Effective Date:** 2026-04-28 (production branch added)
+**Policy:** Feature branches merge to `master` (staging). `production` branch is the live deploy target.
---
## Overview
-### Why Weekly Branching?
+### Three Branches
-1. **Code Review** — Review all changes for a week before merging to master
-2. **Safety** — Easy to rollback if issues are discovered
-3. **Isolation** — Each week's work is independent, reducing merge conflicts
-4. **History** — Clean git log with logical week-based commits
-5. **Testing** — Test entire week's work on feature branch before merging
+| Branch | Purpose |
+|--------|---------|
+| `feature/*`, `week-*` | Development branches. Merge to master when done. |
+| `master` | Staging/dev. No deploy hook. Safe for testing and WIP. |
+| `production` | Live. Triggers deploy. Only merge from master when ready. |
-### Branch Naming Convention
+### Workflow
```
-week-<number>-<description>
+Feature branch (develop, test)
+ ↓
+ Merge to master (staging, review)
+ ↓
+ Merge to production (LIVE DEPLOY)
```
-Examples:
-- `week-3-cards-nav` (Week 3: Cards & Navigation)
-- `week-4-forms-interactions` (Week 4: Forms & Interactive Elements)
-- `week-5-animations-a11y` (Week 5: Animations & Accessibility)
-- `week-6-pages-testing` (Week 6: Missing Pages & End-to-End Testing)
+### Branch Naming
+
+- Feature branches: `feature/*`, `week-*`, `content/*`, `fix/*`
+- Examples: `feature/dark-mode`, `week-5-forms`, `content/article-update`, `fix/button-style`
---
-## Weekly Workflow
+## Feature Branch Workflow
-### Step 1: Create Feature Branch
+### Step 1: Create Feature Branch (Optional)
-At the start of each week, create a new feature branch from `master`:
+For significant work, create a feature branch:
```bash
# Ensure you're on master and up to date
git checkout master
-git pull origin master # (if using remote)
+git pull origin master
# Create feature branch
-git checkout -b week-3-cards-nav
+git checkout -b feature/my-feature
+# or: git checkout -b week-5-forms
# Verify branch created
git branch -v
```
-Output should show:
-```
- master abc1234 commit message
-* week-3-cards-nav abc1234 commit message
-```
-
-The `*` indicates you're on the new branch.
+### Step 2: Implement Changes
-### Step 2: Implement Week's Work
-
-While on the feature branch, implement all changes for the week:
+While on the feature branch, implement all changes:
```bash
-# Make changes to CSS, templates, documentation
+# Make changes to CSS, templates, content, docs
vim themes/danix-xyz-hacker/assets/css/main.css
-vim themes/danix-xyz-hacker/layouts/partials/...
+vim content/en/articles/new-article/index.md
# Rebuild CSS after changes
npm run build
@@ -72,7 +68,7 @@ hugo server
# Check what changed
git status
-git diff themes/danix-xyz-hacker/assets/css/main.css
+git diff
```
### Step 3: Commit Regularly
@@ -97,81 +93,39 @@ git commit -m "feat: add article card component
- Mobile-first responsive design"
```
-### Step 4: Daily Progress Tracking
-
-Update memory at end of each day during the week:
-
-```bash
-# Create/update memory file
-cat > /path/to/.claude/projects/.../memory/week3_progress.md << 'EOF'
-# Week 3 Progress
-
-**Date:** 2026-04-17
-**Status:** In progress (Day 1)
-
-## Completed Today
-- [x] Article card CSS
-- [x] Card integration into templates
-- [x] Responsive testing
-
-## Tomorrow
-- [ ] Navigation header
-- [ ] Hamburger menu
-EOF
-
-git add memory/week3_progress.md
-git commit -m "docs: update week 3 progress (day 1)"
-```
-
-### Step 5: Review Changes at End of Week
+### Step 4: Review Changes Before Merge
-Before merging back to master, review all changes:
+Before merging to master, review all changes:
```bash
-# Show all commits in this week
-git log master..week-3-cards-nav --oneline
+# Show all commits in this branch
+git log master..feature/my-feature --oneline
# Show all file changes (diff summary)
-git diff --stat master..week-3-cards-nav
+git diff --stat master..feature/my-feature
-# Show detailed diff for CSS
-git diff master..week-3-cards-nav themes/danix-xyz-hacker/assets/css/main.css
+# Show detailed diff for critical files
+git diff master..feature/my-feature
-# Show detailed diff for specific template
-git diff master..week-3-cards-nav themes/danix-xyz-hacker/layouts/partials/
-```
-
-Example output:
-```
-abc1234 feat: add article card component
-def5678 feat: add navigation header
-ghi9012 feat: add hamburger menu
-jkl3456 feat: add breadcrumb navigation
-mno7890 docs: update week 3 completion report
-
- themes/danix-xyz-hacker/assets/css/main.css | +180 -0
- themes/danix-xyz-hacker/layouts/partials/card.html | +45 -0
- themes/danix-xyz-hacker/layouts/partials/nav.html | +32 -0
- WEEK3-IMPLEMENTATION.md | +200 -0
- 3 files changed, 457 insertions(+)
+# Check git log looks good
+git log --oneline -10
```
-### Step 6: Test Thoroughly
+### Step 5: Test Thoroughly Before Merge
-Before merging, test everything on the feature branch:
+Test everything on the feature branch:
```bash
# Start dev server
hugo server
# Test in browser:
-# - Dark mode (several pages)
-# - Light mode (toggle, verify all components)
-# - Mobile (320px)
-# - Tablet (768px)
-# - Desktop (1060px+)
-# - Keyboard navigation (Tab, Enter, Escape)
-# - All new components interactive
+# - Dark mode
+# - Light mode
+# - Mobile (320px), tablet (768px), desktop (1060px+)
+# - Keyboard navigation (Tab, Shift+Tab, Escape)
+# - All interactive elements
+# - Responsive layouts
# Run CSS build without errors
npm run build
@@ -208,37 +162,46 @@ git add WEEK3-IMPLEMENTATION.md memory/week3_complete.md
git commit -m "docs: week 3 implementation complete"
```
-### Step 8: Merge Back to Master
+### Step 6: Merge to Master
-Once testing is complete and you're satisfied with all changes:
+Once testing is complete:
```bash
# Switch to master
git checkout master
+git pull origin master
-# Merge feature branch (creates merge commit)
-git merge week-3-cards-nav
-
-# Or merge with --squash if you want single commit per week
-# git merge --squash week-3-cards-nav
-# git commit -m "feat: week 3 - card layouts and navigation components"
+# Merge feature branch
+git merge feature/my-feature
-# Delete the feature branch (optional, good practice)
-git branch -d week-3-cards-nav
+# Optional: Delete the feature branch
+git branch -d feature/my-feature
# Verify merge
git log --oneline -10
+
+# Push to staging (no deploy yet)
+git push origin master
```
-After merge, master will have all Week 3 changes.
+### Step 7: Deploy to Production
-### Step 9: Prepare for Next Week
+When master is ready for the live site:
```bash
-# Create Week 4 branch from updated master
-git checkout -b week-4-forms-interactions
+# Switch to production
+git checkout production
+git pull origin production
+
+# Merge master into production
+git merge master
+
+# This triggers the post-receive hook and live deploy
+git push origin production
-# Continue with Week 4 work...
+# Verify deployment
+# - Check server logs
+# - Test the live site
```
---