summaryrefslogtreecommitdiffstats
path: root/docs/policies/GIT-WORKFLOW-QUICK-REF.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-28 10:38:08 +0200
committerDanilo M. <danix@danix.xyz>2026-04-28 10:38:08 +0200
commitba462ddcef07445294d4e19ca0c5d440d8c51b12 (patch)
treefcaaecfb49693f08d19dadc105d754e4dd923c35 /docs/policies/GIT-WORKFLOW-QUICK-REF.md
parentda66ef2a6fc569587bd611a9c7f2d78b371f69a7 (diff)
downloaddanixxyz-ba462ddcef07445294d4e19ca0c5d440d8c51b12.tar.gz
danixxyz-ba462ddcef07445294d4e19ca0c5d440d8c51b12.zip
docs: update git workflow for production branch strategy
Replace master-as-deploy with three-branch model: feature branches → master (staging) → production (live). Master no longer triggers deploy. Updated CLAUDE.md, AGENTS.md, WORKFLOW.md, and all docs/policies files to reflect production branch approach. Includes deployment commands and updated FAQ. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/policies/GIT-WORKFLOW-QUICK-REF.md')
-rw-r--r--docs/policies/GIT-WORKFLOW-QUICK-REF.md118
1 files changed, 56 insertions, 62 deletions
diff --git a/docs/policies/GIT-WORKFLOW-QUICK-REF.md b/docs/policies/GIT-WORKFLOW-QUICK-REF.md
index 43c6a6d..c79d62b 100644
--- a/docs/policies/GIT-WORKFLOW-QUICK-REF.md
+++ b/docs/policies/GIT-WORKFLOW-QUICK-REF.md
@@ -1,16 +1,22 @@
# Git Workflow Quick Reference
-## Before Each Week
+## Three Branches
-```bash
-# Create feature branch
-git checkout -b week-3-cards-nav
+| Branch | Purpose | Deploy |
+|--------|---------|--------|
+| `feature/*`, `week-*` | Development | No |
+| `master` | Staging/dev | No |
+| `production` | Live | **Yes** |
+
+## Create Feature Branch (Optional)
-# Verify you're on the new branch
+```bash
+git checkout -b feature/my-feature
+# or: git checkout -b week-5-forms
git branch -v
```
-## During the Week
+## During Development
```bash
# Check status
@@ -19,99 +25,87 @@ git status
# See what changed
git diff
-# Stage files for commit
-git add themes/danix-xyz-hacker/assets/css/main.css
-git add themes/danix-xyz-hacker/layouts/partials/card.html
+# Stage and commit
+git add <files>
+git commit -m "feat: add component"
-# Commit regularly
-git commit -m "feat: add article card component with hover effects"
-
-# Rebuild CSS
+# Rebuild CSS if changed templates
npm run build
-# Test in browser
+# Test
hugo server
```
-## Common Commands
+## Review Changes
```bash
# View recent commits
git log --oneline -10
# View all changes since master
-git diff master..week-3-cards-nav
-
-# View specific file changes
-git diff master..week-3-cards-nav themes/danix-xyz-hacker/assets/css/main.css
+git diff master..feature/my-feature
-# Undo last commit (keep changes)
-git reset --soft HEAD~1
+# View changes summary
+git diff --stat master..feature/my-feature
+```
-# Undo last commit (discard changes)
-git reset --hard HEAD~1
+## Merge to Master (Staging)
-# Switch between branches
+```bash
git checkout master
-git checkout week-3-cards-nav
+git pull origin master
+git merge feature/my-feature
+git branch -d feature/my-feature # optional
+git push origin master
```
-## At End of Week
+## Deploy to Production (LIVE)
```bash
-# Review all changes
-git diff master..week-3-cards-nav
+git checkout production
+git pull origin production
+git merge master
+git push origin production
+# ← This triggers the live rebuild
+```
-# Review summary
-git diff --stat master..week-3-cards-nav
+## Common Commands
-# Review commit history
-git log master..week-3-cards-nav --oneline
+```bash
+# Undo last commit (keep changes)
+git reset --soft HEAD~1
-# Test thoroughly in browser
-# - Dark mode
-# - Light mode
-# - Mobile (320px)
-# - Tablet (768px)
-# - Desktop (1060px+)
-# - Keyboard nav (Tab, Enter, Escape)
-# - All interactive components
+# Undo last commit (discard changes)
+git reset --hard HEAD~1
-# Merge to master
+# Switch branches
git checkout master
-git merge week-3-cards-nav
+git checkout feature/my-feature
-# Delete feature branch
-git branch -d week-3-cards-nav
-
-# Verify merge
-git log --oneline -5
+# Rebase feature branch on latest master (optional)
+git checkout feature/my-feature
+git rebase master
```
## Commit Message Template
```
-feat: add article card component
+feat: add contact form component
-- Image with 16:9 aspect ratio
-- Title, excerpt, badge, button
-- Hover: lift -2px, shadow enhancement
+- Form validation
- Dark/light mode support
-- Mobile-first responsive design
+- WCAG AA accessibility
```
## Key Points
-✅ Create feature branch at start of week
-✅ Commit regularly (after each component)
-✅ Use clear commit messages
-✅ Test before end of week
-✅ Review all changes before merging
-✅ Merge to master when ready
-✅ Delete feature branch after merge
-✅ Repeat for next week
+✅ Feature branch or quick master commits
+✅ Commit regularly after logical units
+✅ Clear commit messages
+✅ Test in browser before merging
+✅ Merge feature → master (staging)
+✅ Merge master → production (LIVE DEPLOY)
## For Full Details
-See `GIT-WORKFLOW.md` for comprehensive workflow documentation.
-
+See `GIT-WORKFLOW.md` for comprehensive documentation.