diff options
Diffstat (limited to 'docs/policies/GIT-WORKFLOW-QUICK-REF.md')
| -rw-r--r-- | docs/policies/GIT-WORKFLOW-QUICK-REF.md | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/docs/policies/GIT-WORKFLOW-QUICK-REF.md b/docs/policies/GIT-WORKFLOW-QUICK-REF.md new file mode 100644 index 0000000..43c6a6d --- /dev/null +++ b/docs/policies/GIT-WORKFLOW-QUICK-REF.md @@ -0,0 +1,117 @@ +# Git Workflow Quick Reference + +## Before Each Week + +```bash +# Create feature branch +git checkout -b week-3-cards-nav + +# Verify you're on the new branch +git branch -v +``` + +## During the Week + +```bash +# Check status +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 + +# Commit regularly +git commit -m "feat: add article card component with hover effects" + +# Rebuild CSS +npm run build + +# Test in browser +hugo server +``` + +## Common Commands + +```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 + +# Undo last commit (keep changes) +git reset --soft HEAD~1 + +# Undo last commit (discard changes) +git reset --hard HEAD~1 + +# Switch between branches +git checkout master +git checkout week-3-cards-nav +``` + +## At End of Week + +```bash +# Review all changes +git diff master..week-3-cards-nav + +# Review summary +git diff --stat master..week-3-cards-nav + +# Review commit history +git log master..week-3-cards-nav --oneline + +# Test thoroughly in browser +# - Dark mode +# - Light mode +# - Mobile (320px) +# - Tablet (768px) +# - Desktop (1060px+) +# - Keyboard nav (Tab, Enter, Escape) +# - All interactive components + +# Merge to master +git checkout master +git merge week-3-cards-nav + +# Delete feature branch +git branch -d week-3-cards-nav + +# Verify merge +git log --oneline -5 +``` + +## Commit Message Template + +``` +feat: add article card component + +- Image with 16:9 aspect ratio +- Title, excerpt, badge, button +- Hover: lift -2px, shadow enhancement +- Dark/light mode support +- Mobile-first responsive design +``` + +## 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 + +## For Full Details + +See `GIT-WORKFLOW.md` for comprehensive workflow documentation. + |
