summaryrefslogtreecommitdiffstats
path: root/docs/policies/GIT-WORKFLOW-QUICK-REF.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-QUICK-REF.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-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.