blob: 43c6a6d961067aff308e8400d6f5f66d87ef90dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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.
|