-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1512 lines (1363 loc) · 70.9 KB
/
index.html
File metadata and controls
1512 lines (1363 loc) · 70.9 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!-- saved from url=(0049)file:///Users/user/Downloads/git-tutorial_22.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Git & GitHub — A Beginner's Guide</title>
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--bg: #F7F6F2;
--surface: #FFFFFF;
--border: #E2E0D8;
--text: #1A1917;
--text-muted: #6B6860;
--accent: #2B5BE0;
--accent-light: #EEF2FD;
--accent-muted: #C5D0F7;
--green: #1E7A4C;
--green-light: #EAF5EE;
--amber: #B45309;
--amber-light: #FEF3E2;
--purple: #6D28D9;
--purple-light: #F3EFFE;
--local: #1E4ED8;
--local-light: #DBEAFE;
--remote: #065F46;
--remote-light: #D1FAE5;
--arrow: #9CA3AF;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'DM Sans', sans-serif;
background: var(--bg);
color: var(--text);
font-size: 15px;
line-height: 1.6;
}
/* ── HEADER ── */
header {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 32px 48px 28px;
max-width: 960px;
margin: 40px auto 0;
border-radius: 12px 12px 0 0;
}
.header-tag {
display: inline-block;
font-family: 'DM Mono', monospace;
font-size: 11px;
font-weight: 500;
letter-spacing: .08em;
text-transform: uppercase;
color: var(--accent);
background: var(--accent-light);
padding: 3px 10px;
border-radius: 4px;
margin-bottom: 14px;
}
header h1 {
font-family: 'DM Serif Display', serif;
font-size: 36px;
font-weight: 400;
line-height: 1.2;
letter-spacing: -.02em;
color: var(--text);
}
header p {
color: var(--text-muted);
margin-top: 10px;
max-width: 580px;
font-size: 15px;
}
/* ── NAV PROGRESS ── */
.progress-bar {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 0 48px;
max-width: 960px;
margin: 0 auto;
display: flex;
justify-content: flex-start;
gap: 0;
overflow-x: auto;
}
.prog-item {
display: flex;
align-items: center;
gap: 6px;
padding: 14px 0;
margin-right: 16px;
cursor: pointer;
border-bottom: 2px solid transparent;
color: var(--text-muted);
font-size: 12px;
font-weight: 500;
white-space: nowrap;
transition: color .2s, border-color .2s;
}
.prog-item:last-child { margin-right: 0; }
.prog-item:hover { color: var(--accent); }
.prog-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.prog-num {
width: 18px; height: 18px;
border-radius: 50%;
background: var(--border);
display: flex; align-items: center; justify-content: center;
font-size: 10px; font-weight: 600;
color: var(--text-muted);
transition: background .2s, color .2s;
}
.prog-item.active .prog-num {
background: var(--accent);
color: white;
}
/* ── MAIN ── */
main {
max-width: 960px;
margin: 0 auto 60px;
background: var(--surface);
border: 1px solid var(--border);
border-top: none;
border-radius: 0 0 12px 12px;
overflow: hidden;
}
/* ── SECTIONS ── */
.section {
display: none;
padding: 44px 48px;
border-bottom: 1px solid var(--border);
}
.section.active { display: block; }
.section-header {
display: flex;
align-items: flex-start;
gap: 16px;
margin-bottom: 28px;
}
.section-icon {
width: 44px; height: 44px;
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 20px;
flex-shrink: 0;
}
.section-header h2 {
font-family: 'DM Serif Display', serif;
font-size: 26px;
font-weight: 400;
letter-spacing: -.01em;
line-height: 1.2;
}
.section-header p {
color: var(--text-muted);
font-size: 14px;
margin-top: 4px;
}
/* ── CONCEPT CARD ── */
.concept-card {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 10px;
padding: 20px 22px;
margin-bottom: 20px;
}
.concept-card h3 {
font-size: 14px;
font-weight: 600;
margin-bottom: 6px;
display: flex;
align-items: center;
gap: 7px;
}
.concept-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
/* ── DIAGRAM BASE ── */
.diagram-wrap {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 10px;
padding: 28px 24px;
margin: 24px 0;
}
.diagram-label {
font-family: 'DM Mono', monospace;
font-size: 11px;
letter-spacing: .08em;
text-transform: uppercase;
color: var(--text-muted);
margin-bottom: 16px;
}
/* ── LOCAL / REMOTE DIAGRAM ── */
.two-col-diagram {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
}
.env-box {
border-radius: 10px;
padding: 20px;
width: 100%;
max-width: 320px;
}
.env-box.local {
background: var(--local-light);
border: 1.5px solid var(--accent-muted);
}
.env-box.remote {
background: var(--remote-light);
border: 1.5px solid #6EE7B7;
}
.env-title {
font-size: 11px;
font-weight: 600;
letter-spacing: .08em;
text-transform: uppercase;
margin-bottom: 12px;
}
.local .env-title { color: var(--local); }
.remote .env-title { color: var(--remote); }
.file-list { list-style: none; }
.file-list li {
display: flex;
align-items: center;
gap: 7px;
font-family: 'DM Mono', monospace;
font-size: 12px;
padding: 4px 8px;
border-radius: 5px;
margin-bottom: 3px;
color: var(--text);
}
.local .file-list li { background: rgba(43,91,224,.08); }
.remote .file-list li { background: rgba(30,122,76,.08); }
.arrow-col {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 10px;
padding: 6px 0;
width: 100%;
max-width: 320px;
}
.arrow-pill {
font-family: 'DM Mono', monospace;
font-size: 10px;
font-weight: 500;
padding: 4px 8px;
border-radius: 20px;
letter-spacing: .04em;
text-align: center;
white-space: nowrap;
}
.arrow-pill.push { background: var(--accent-light); color: var(--accent); }
.arrow-pill.pull { background: var(--green-light); color: var(--green); }
/* ── SVG ARROWS ── */
.flow-svg { width: 100%; overflow: visible; }
/* ── WORKFLOW STEPS ── */
.workflow-steps {
display: flex;
flex-direction: column;
gap: 0;
margin: 20px 0;
}
.workflow-step {
display: grid;
grid-template-columns: 36px 1fr;
gap: 16px;
position: relative;
}
.workflow-step:not(:last-child)::after {
content: '';
position: absolute;
left: 17px;
top: 36px;
bottom: -8px;
width: 2px;
background: var(--border);
}
.step-circle {
width: 36px; height: 36px;
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-family: 'DM Mono', monospace;
font-size: 13px;
font-weight: 500;
flex-shrink: 0;
z-index: 1;
position: relative;
}
.step-body {
padding: 6px 0 24px;
}
.step-body h4 {
font-size: 15px;
font-weight: 600;
margin-bottom: 4px;
}
.step-body p { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
/* ── CODE BLOCK ── */
.code-block {
background: #1A1917;
color: #E5E3DC;
border-radius: 8px;
padding: 14px 16px;
font-family: 'DM Mono', monospace;
font-size: 13px;
line-height: 1.7;
margin-top: 8px;
}
.code-block .prompt { color: #6B6860; user-select: none; }
.code-block .cmd { color: #93C5FD; }
.code-block .flag { color: #FCA5A5; }
.code-block .arg { color: #86EFAC; }
.code-block .comment { color: #6B6860; font-style: italic; }
.code-block .output { color: #A8A29E; }
/* ── CALLOUT ── */
.callout {
display: flex;
gap: 12px;
padding: 14px 16px;
border-radius: 8px;
font-size: 14px;
margin: 16px 0;
line-height: 1.5;
}
.callout.info { background: #F0F4F8; border-left: 3px solid #64748B; }
.callout.tip { background: #FFF0F0; border-left: 3px solid #E57373; }
.callout.note { background: #F0F4F8; border-left: 3px solid #64748B; }
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.callout strong { display: block; font-weight: 600; margin-bottom: 2px; }
/* ── ANALOGY BOX ── */
.analogy {
background: var(--purple-light);
border: 1px solid #DDD6FE;
border-radius: 10px;
padding: 18px 20px;
margin: 20px 0;
font-size: 14px;
}
.analogy-title {
font-size: 11px;
font-weight: 600;
letter-spacing: .08em;
text-transform: uppercase;
color: var(--purple);
margin-bottom: 8px;
}
.analogy p { color: var(--text); line-height: 1.6; }
/* ── STAGE DIAGRAM ── */
.stage-diagram {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
margin: 20px 0;
}
.stage-box {
border-radius: 8px;
padding: 14px 16px;
text-align: center;
width: 100%;
max-width: 420px;
}
.stage-box .stage-name {
font-size: 12px;
font-weight: 600;
letter-spacing: .03em;
margin-bottom: 4px;
}
.stage-box .stage-desc {
font-size: 11px;
color: var(--text-muted);
line-height: 1.4;
}
.stage-box.working { background: #FEF3E2; border: 1.5px solid #FCD34D; }
.stage-box.staging { background: var(--accent-light); border: 1.5px solid var(--accent-muted); }
.stage-box.committed { background: var(--green-light); border: 1.5px solid #6EE7B7; }
.stage-arrow {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 6px;
font-family: 'DM Mono', monospace;
font-size: 11px;
color: var(--text-muted);
font-weight: 500;
padding: 4px 0;
width: 100%;
max-width: 420px;
}
.stage-arrow svg { color: var(--arrow); }
/* ── FORK DIAGRAM ── */
.fork-diagram {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
padding: 10px 0;
}
.repo-node {
border-radius: 10px;
padding: 14px 22px;
text-align: center;
min-width: 180px;
}
.repo-node.original {
background: var(--remote-light);
border: 1.5px solid #6EE7B7;
}
.repo-node.fork {
background: var(--remote-light);
border: 1.5px solid #6EE7B7;
}
.repo-node.local-clone {
background: var(--local-light);
border: 1.5px solid var(--accent-muted);
}
.repo-node .node-label {
font-size: 11px;
font-weight: 600;
letter-spacing: .06em;
text-transform: uppercase;
margin-bottom: 3px;
}
.original .node-label { color: var(--remote); }
.fork .node-label { color: var(--remote); }
.local-clone .node-label { color: var(--local); }
.repo-node .node-name {
font-family: 'DM Mono', monospace;
font-size: 12px;
color: var(--text);
}
.fork-row {
display: flex;
gap: 40px;
justify-content: center;
}
.connector {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 6px 0;
}
.connector-line {
width: 2px;
height: 28px;
background: var(--border);
}
.connector-label {
font-family: 'DM Mono', monospace;
font-size: 10px;
color: var(--text-muted);
font-weight: 500;
letter-spacing: .04em;
}
.fork-connectors {
display: flex;
gap: 40px;
justify-content: center;
position: relative;
}
.fork-connectors::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%);
height: 2px;
width: 160px;
background: var(--border);
}
/* ── NAVIGATION ── */
.nav-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 48px;
border-top: 1px solid var(--border);
}
.nav-btn {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
border: 1.5px solid var(--border);
background: var(--surface);
color: var(--text);
font-family: 'DM Sans', sans-serif;
transition: all .15s;
}
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn.primary {
background: var(--accent);
border-color: var(--accent);
color: white;
}
.nav-btn.primary:hover { background: #1E4BC4; border-color: #1E4BC4; }
.nav-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.progress-text {
font-size: 13px;
color: var(--text-muted);
font-family: 'DM Mono', monospace;
}
/* ── GLOSSARY CHIPS ── */
.glossary-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 16px 0;
}
.glossary-chip {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
border: 1.5px solid transparent;
}
.chip-mono { font-family: 'DM Mono', monospace; }
</style>
</head>
<body>
<header>
<div class="header-tag">Beginner's Guide</div>
<h1>Git & GitHub<br>From Your Computer to the Cloud</h1>
<p>A visual, step-by-step guide to understanding version control — no prior experience needed.</p>
</header>
<!-- PROGRESS NAV -->
<div class="progress-bar" id="progressBar">
<div class="prog-item active" onclick="goTo(0)">
<span class="prog-num">1</span> What is Git?
</div>
<div class="prog-item" onclick="goTo(1)">
<span class="prog-num">2</span> Local vs Remote
</div>
<div class="prog-item" onclick="goTo(2)">
<span class="prog-num">3</span> Add & Commit
</div>
<div class="prog-item" onclick="goTo(3)">
<span class="prog-num">4</span> Push & Pull
</div>
<div class="prog-item" onclick="goTo(4)">
<span class="prog-num">5</span> Fork & Clone
</div>
<div class="prog-item" onclick="goTo(5)">
<span class="prog-num">6</span> Branches
</div>
<div class="prog-item" onclick="goTo(6)">
<span class="prog-num">7</span> Pull Requests
</div>
</div>
<main>
<!-- ══ SECTION 1: WHAT IS GIT ══ -->
<div class="section active" id="sec-0">
<div class="section-header">
<div class="section-icon" style="background:#FEF9C3;">📖</div>
<div>
<h2>What is Git — and why does it matter?</h2>
<p>Understanding the core idea before touching a command</p>
</div>
</div>
<p style="color:var(--text-muted);margin-bottom:20px;font-size:15px;">
Imagine working on training notes and saving them as <code style="font-family:'DM Mono',monospace;font-size:13px;background:var(--bg);padding:2px 6px;border-radius:4px;">notes.txt</code>, then <code style="font-family:'DM Mono',monospace;font-size:13px;background:var(--bg);padding:2px 6px;border-radius:4px;">notes_v2.txt</code>, then <code style="font-family:'DM Mono',monospace;font-size:13px;background:var(--bg);padding:2px 6px;border-radius:4px;">notes_FINAL_really_final.txt</code>… Git is a smarter way to track changes so you never need that chaos.
</p>
<div class="diagram-wrap">
<div class="diagram-label" style="text-align:center;">Before vs after using Git</div>
<svg viewBox="0 0 580 260" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:560px;display:block;margin:0 auto;">
<defs>
<marker id="chk" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto">
<path d="M0,0 L0,8 L10,4 z" fill="#0F6E56"></path>
</marker>
</defs>
<!-- LEFT: without git -->
<rect x="10" y="10" width="250" height="240" rx="8" fill="#FCEBEB" stroke="#E24B4A" stroke-width="1.5"></rect>
<text x="135" y="34" font-family="DM Sans,sans-serif" font-size="14" font-weight="600" fill="#A32D2D" text-anchor="middle">without Git</text>
<rect x="26" y="48" width="218" height="28" rx="4" fill="#F7C1C1" stroke="#F09595" stroke-width="0.5"></rect>
<text x="38" y="67" font-family="DM Mono,monospace" font-size="13" fill="#501313">notes.txt</text>
<rect x="26" y="84" width="218" height="28" rx="4" fill="#F7C1C1" stroke="#F09595" stroke-width="0.5"></rect>
<text x="38" y="103" font-family="DM Mono,monospace" font-size="13" fill="#501313">notes_v2.txt</text>
<rect x="26" y="120" width="218" height="28" rx="4" fill="#F7C1C1" stroke="#F09595" stroke-width="0.5"></rect>
<text x="38" y="139" font-family="DM Mono,monospace" font-size="13" fill="#501313">notes_final.txt</text>
<rect x="26" y="156" width="218" height="28" rx="4" fill="#F7C1C1" stroke="#F09595" stroke-width="0.5"></rect>
<text x="38" y="175" font-family="DM Mono,monospace" font-size="13" fill="#501313">notes_final_v2.txt</text>
<rect x="26" y="192" width="218" height="28" rx="4" fill="#F7C1C1" stroke="#F09595" stroke-width="0.5"></rect>
<text x="38" y="211" font-family="DM Mono,monospace" font-size="12" fill="#501313">notes_FINAL_really_final.txt</text>
<circle cx="243" cy="232" r="12" fill="#E24B4A"></circle>
<text x="243" y="237" font-family="DM Sans,sans-serif" font-size="15" font-weight="600" fill="#FCEBEB" text-anchor="middle">✕</text>
<!-- DIVIDER -->
<line x1="290" y1="20" x2="290" y2="240" stroke="#CBD5E1" stroke-width="1" stroke-dasharray="4,4"></line>
<!-- RIGHT: with git -->
<rect x="320" y="10" width="250" height="240" rx="8" fill="#E1F5EE" stroke="#1D9E75" stroke-width="1.5"></rect>
<text x="445" y="34" font-family="DM Sans,sans-serif" font-size="14" font-weight="600" fill="#0F6E56" text-anchor="middle">with Git</text>
<!-- timeline spine -->
<line x1="370" y1="52" x2="370" y2="218" stroke="#9FE1CB" stroke-width="2"></line>
<!-- commit 1 -->
<circle cx="370" cy="62" r="6" fill="#1D9E75" stroke="#E1F5EE" stroke-width="2"></circle>
<rect x="385" y="51" width="167" height="24" rx="4" fill="#9FE1CB" stroke="#5DCAA5" stroke-width="0.5"></rect>
<text x="396" y="67" font-family="DM Sans,sans-serif" font-size="13" fill="#085041">Add week 1 notes</text>
<!-- commit 2 -->
<circle cx="370" cy="100" r="6" fill="#1D9E75" stroke="#E1F5EE" stroke-width="2"></circle>
<rect x="385" y="89" width="167" height="24" rx="4" fill="#9FE1CB" stroke="#5DCAA5" stroke-width="0.5"></rect>
<text x="396" y="105" font-family="DM Sans,sans-serif" font-size="13" fill="#085041">Revise week 2 content</text>
<!-- commit 3 -->
<circle cx="370" cy="138" r="6" fill="#1D9E75" stroke="#E1F5EE" stroke-width="2"></circle>
<rect x="385" y="127" width="167" height="24" rx="4" fill="#9FE1CB" stroke="#5DCAA5" stroke-width="0.5"></rect>
<text x="396" y="143" font-family="DM Sans,sans-serif" font-size="13" fill="#085041">Add week 3 examples</text>
<!-- commit 4 -->
<circle cx="370" cy="176" r="6" fill="#1D9E75" stroke="#E1F5EE" stroke-width="2"></circle>
<rect x="385" y="165" width="167" height="24" rx="4" fill="#9FE1CB" stroke="#5DCAA5" stroke-width="0.5"></rect>
<text x="396" y="181" font-family="DM Sans,sans-serif" font-size="13" fill="#085041">Update quiz questions</text>
<!-- commit 5 -->
<circle cx="370" cy="214" r="6" fill="#1D9E75" stroke="#E1F5EE" stroke-width="2"></circle>
<rect x="385" y="203" width="167" height="24" rx="4" fill="#9FE1CB" stroke="#5DCAA5" stroke-width="0.5"></rect>
<text x="396" y="219" font-family="DM Sans,sans-serif" font-size="13" fill="#085041">Final edits</text>
<circle cx="553" cy="232" r="12" fill="#1D9E75"></circle>
<text x="553" y="237" font-family="DM Sans,sans-serif" font-size="15" font-weight="600" fill="#E1F5EE" text-anchor="middle">✓</text>
</svg>
</div>
<div class="analogy">
<div class="analogy-title">💡 The core analogy</div>
<p><strong>Git is like a time machine for your files.</strong> Every time you save a meaningful checkpoint (called a <em>commit</em>), Git remembers exactly what your project looked like at that moment. You can always go back, compare versions, or work on new ideas without breaking what already works.</p>
</div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:4px;">
<div class="concept-card">
<h3>🗂 Git</h3>
<p>A <strong>version control system</strong> that runs on your own computer. It tracks every change you make to your files over time. On its own, Git only works locally — to share your work or collaborate with others, you need a hosting platform.</p>
</div>
<div class="concept-card">
<h3>☁️ Git hosting platforms</h3>
<p>Websites that store your Git project in the cloud so you can back it up, share it, and collaborate with others. Common examples include <strong>GitHub</strong>, <strong>GitLab</strong>, and <strong>Bitbucket</strong>.</p>
</div>
</div>
<div class="callout info" style="margin-top:20px;">
<span class="callout-icon">💡</span>
<div><strong>Note: Git ≠ GitHub (or GitLab, or Bitbucket)</strong> Git is the tool. Hosting platforms are services that let you use it in the cloud — like how email is the tool, and Gmail or Outlook are services that provide it.</div>
</div>
</div>
<!-- ══ SECTION 2: LOCAL VS REMOTE ══ -->
<div class="section" id="sec-1">
<div class="section-header">
<div class="section-icon" style="background:#FEF9C3;">🖥</div>
<div>
<h2>Local vs Remote Repository</h2>
<p>Your files live in two places — here's how they relate</p>
</div>
</div>
<p style="color:var(--text-muted);margin-bottom:20px;">A <strong>repository</strong> (or "repo") is just a folder that Git is tracking. The same project exists in two places: on your personal computer, and on a Git hosting platform in the cloud.</p>
<div class="diagram-wrap">
<div class="diagram-label" style="text-align:center;">The two environments</div>
<div class="two-col-diagram">
<!-- REMOTE (top) -->
<div class="env-box remote">
<div class="env-title">☁️ Remote — Git hosting platform</div>
<ul class="file-list">
<li>📄 notes.txt</li>
<li>📝 report.docx</li>
<li>📊 data.xlsx</li>
<li>📜 commit history</li>
</ul>
</div>
<!-- ARROWS -->
<div class="arrow-col">
<div class="arrow-pill push">↑ push</div>
<div class="arrow-pill pull">pull ↓</div>
</div>
<!-- LOCAL (bottom) -->
<div class="env-box local">
<div class="env-title">🖥 Local — Your Computer</div>
<ul class="file-list">
<li>📄 notes.txt</li>
<li>📝 report.docx</li>
<li>📊 data.xlsx</li>
<li>📁 .git/</li>
</ul>
</div>
</div>
</div>
<div class="analogy">
<div class="analogy-title">💡 Think of it like a shared document</div>
<p>Your local repo is like a <strong>printed copy on your desk</strong> — you can mark it up freely. The remote repo on your hosting platform is like the <strong>master copy in a shared filing cabinet</strong>. When you're happy with your changes, you send them up (<em>push</em>). To get the latest version someone else added, you bring it down (<em>pull</em>).</p>
</div>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:14px;">
<div class="concept-card">
<h3 style="color:var(--local);">🖥 Local Repository</h3>
<p>Lives on your machine. You can edit files, test changes, and use Git — all without internet access.</p>
</div>
<div class="concept-card">
<h3 style="color:var(--remote);">☁️ Remote Repository</h3>
<p>Lives on a Git hosting platform (such as GitHub or GitLab). Serves as the shared, backed-up version that teammates (or your future self) can access.</p>
</div>
</div>
<div class="callout info">
<span class="callout-icon">💡</span>
<div><strong>Note: Changes don't sync automatically</strong> Changes you make locally do <em>not</em> automatically appear on your hosting platform. You have to explicitly send them up. This gives you full control over what gets shared.</div>
</div>
</div>
<!-- ══ SECTION 3: ADD & COMMIT ══ -->
<div class="section" id="sec-2">
<div class="section-header">
<div class="section-icon" style="background:#FEF9C3;">📦</div>
<div>
<h2>git add & git commit</h2>
<p>Preparing and saving a snapshot of your work</p>
</div>
</div>
<p style="color:var(--text-muted);margin-bottom:20px;">For Git to log the changes made to a file in the local repo, two things need to happen: <strong>staging</strong> (selecting what to include) and <strong>committing</strong> (saving the snapshot with a message). Only after committing can you send your updated files to the remote repo.</p>
<!-- STAGE DIAGRAM -->
<div class="diagram-wrap">
<div class="diagram-label" style="text-align:center;">The three states of a file</div>
<div style="display:flex;flex-direction:column;align-items:center;gap:0;background:#DBEAFE;border:2px solid #93C5FD;border-radius:10px;padding:16px 20px 20px;max-width:320px;margin:0 auto;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#1E40AF;letter-spacing:.08em;text-align:center;text-transform:uppercase;margin-bottom:14px;">🖥 Local Repository</div>
<!-- Saved box -->
<div style="background:#BFDBFE;border:1.5px solid #93C5FD;border-radius:8px;padding:14px 16px;text-align:center;width:100%;max-width:260px;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#1E40AF;">Saved</div>
<div style="font-family:'DM Mono',monospace;font-size:12px;color:#1E40AF;margin-top:3px;">locked into Git's history</div>
</div>
<!-- git commit pill -->
<div style="padding:8px 0;display:flex;justify-content:center;">
<span class="arrow-pill push" style="background:var(--accent-light);color:var(--accent);">↑ git commit</span>
</div>
<!-- Staging Area box (neutral grey — transient state) -->
<div style="background:#F1F5F9;border:1.5px solid #CBD5E1;border-radius:8px;padding:14px 16px;text-align:center;width:100%;max-width:260px;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#475569;">Staging Area</div>
<div style="font-family:'DM Mono',monospace;font-size:12px;color:#64748B;margin-top:3px;">ready to commit</div>
</div>
<!-- git add pill -->
<div style="padding:8px 0;display:flex;justify-content:center;">
<span class="arrow-pill push" style="background:var(--accent-light);color:var(--accent);">↑ git add</span>
</div>
<!-- Draft box (amber — unchanged) -->
<div style="background:#FEF3E2;border:1.5px solid #FCD34D;border-radius:8px;padding:14px 16px;text-align:center;width:100%;max-width:260px;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#B45309;">Draft</div>
<div style="font-family:'DM Mono',monospace;font-size:12px;color:#92400E;margin-top:3px;">edited files</div>
</div>
</div>
</div>
<p style="font-size:13px;color:var(--text-muted);margin-top:-8px;">💡 <strong>Saved</strong> means your changes are recorded in your local repo. Use <code style="font-family:'DM Mono',monospace;font-size:12px;">git push</code> to send them up to your hosting platform.</p>
<div class="analogy">
<div class="analogy-title">💡 The packing analogy</div>
<p style="font-size:14px;color:var(--text);margin-bottom:14px;">Think of sending files from the local repo to the remote repo like shipping a package. <strong>git add</strong> is putting items into the box — you choose exactly what to include. <strong>git commit</strong> is sealing and labeling the box before it goes into storage. The label (your commit message) describes what's inside.</p>
<div style="display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin:0 0 8px;">
<!-- git add: open box -->
<div style="display:flex;flex-direction:column;align-items:center;gap:8px;">
<svg width="72" height="64" viewBox="0 0 72 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- box body — identical position to git commit -->
<rect x="10" y="18" width="52" height="38" rx="3" fill="#FEF3E2" stroke="#F59E0B" stroke-width="2"></rect>
<!-- left flap folded outward -->
<path d="M10 18 L2 12 L10 26" fill="#FDE68A" stroke="#F59E0B" stroke-width="1.8" stroke-linejoin="round"></path>
<!-- right flap folded outward -->
<path d="M62 18 L70 12 L62 26" fill="#FDE68A" stroke="#F59E0B" stroke-width="1.8" stroke-linejoin="round"></path>
<!-- file going in -->
<rect x="28" y="4" width="16" height="12" rx="2" fill="#93C5FD" stroke="#3B82F6" stroke-width="1.5"></rect>
<line x1="31" y1="8" x2="41" y2="8" stroke="#3B82F6" stroke-width="1.2"></line>
<line x1="31" y1="11" x2="38" y2="11" stroke="#3B82F6" stroke-width="1.2"></line>
<!-- arrow down into box -->
<path d="M36 17 L36 22" stroke="#F59E0B" stroke-width="1.8" stroke-linecap="round" marker-end="url(#addArr)"></path>
<defs>
<marker id="addArr" markerWidth="6" markerHeight="6" refX="3" refY="3" orient="auto">
<path d="M0,0 L0,6 L6,3 z" fill="#F59E0B"></path>
</marker>
</defs>
</svg>
<div style="text-align:center;">
<div style="font-family:'DM Mono',monospace;font-size:12px;font-weight:600;color:var(--amber);">git add</div>
<div style="font-size:12px;color:var(--text-muted);margin-top:2px;">Put files in the box</div>
</div>
</div>
<!-- git commit: sealed box with label -->
<div style="display:flex;flex-direction:column;align-items:center;gap:8px;">
<svg width="72" height="64" viewBox="0 0 72 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- box body -->
<rect x="10" y="18" width="52" height="38" rx="3" fill="#FEF3E2" stroke="#F59E0B" stroke-width="2"></rect>
<!-- sealed top flap -->
<rect x="10" y="14" width="52" height="8" rx="2" fill="#FDE68A" stroke="#F59E0B" stroke-width="1.8"></rect>
<!-- tape strip -->
<rect x="30" y="12" width="12" height="12" rx="1" fill="#FCD34D" opacity="0.8"></rect>
<!-- label on box -->
<rect x="18" y="32" width="36" height="16" rx="2" fill="white" stroke="#F59E0B" stroke-width="1.2"></rect>
<line x1="22" y1="37" x2="46" y2="37" stroke="#F59E0B" stroke-width="1.2"></line>
<line x1="22" y1="41" x2="40" y2="41" stroke="#F59E0B" stroke-width="1.2"></line>
</svg>
<div style="text-align:center;">
<div style="font-family:'DM Mono',monospace;font-size:12px;font-weight:600;color:var(--accent);">git commit</div>
<div style="font-size:12px;color:var(--text-muted);margin-top:2px;">Seal & label the box</div>
</div>
</div>
<!-- git push: delivery truck -->
<div style="display:flex;flex-direction:column;align-items:center;gap:8px;">
<svg width="72" height="64" viewBox="0 0 72 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- truck body / cargo -->
<rect x="4" y="22" width="40" height="26" rx="3" fill="#D1FAE5" stroke="#34D399" stroke-width="2"></rect>
<!-- cab -->
<path d="M44 34 L44 48 L66 48 L66 38 L58 28 L44 28 Z" fill="#A7F3D0" stroke="#34D399" stroke-width="2" stroke-linejoin="round"></path>
<!-- windshield -->
<path d="M58 30 L64 38 L50 38 L50 30 Z" fill="#BAE6FD" stroke="#34D399" stroke-width="1.2"></path>
<!-- wheels -->
<circle cx="18" cy="50" r="6" fill="#6B7280" stroke="#374151" stroke-width="1.5"></circle>
<circle cx="18" cy="50" r="2.5" fill="#D1FAE5"></circle>
<circle cx="54" cy="50" r="6" fill="#6B7280" stroke="#374151" stroke-width="1.5"></circle>
<circle cx="54" cy="50" r="2.5" fill="#A7F3D0"></circle>
<!-- motion lines -->
<line x1="1" y1="30" x2="6" y2="30" stroke="#34D399" stroke-width="1.5" stroke-linecap="round"></line>
<line x1="1" y1="35" x2="7" y2="35" stroke="#34D399" stroke-width="1.5" stroke-linecap="round"></line>
<line x1="1" y1="40" x2="5" y2="40" stroke="#34D399" stroke-width="1.5" stroke-linecap="round"></line>
</svg>
<div style="text-align:center;">
<div style="font-family:'DM Mono',monospace;font-size:12px;font-weight:600;color:var(--green);">git push</div>
<div style="font-size:12px;color:var(--text-muted);margin-top:2px;">Ship it to GitHub</div>
</div>
</div>
</div>
</div>
<div class="workflow-steps">
<div class="workflow-step">
<div class="step-circle" style="background:var(--amber-light);color:var(--amber);">1</div>
<div class="step-body">
<h4>Stage your changes with <code style="font-family:'DM Mono',monospace;font-weight:400;">git add</code></h4>
<p>Tell Git which changed files you want to include in the next snapshot.</p>
<div class="code-block">
<span class="prompt">$ </span><span class="cmd">git add</span> <span class="arg">notes.txt</span>
<br><span class="comment"># Stage a specific file</span>
<br><br><span class="prompt">$ </span><span class="cmd">git add</span> <span class="flag">.</span>
<br><span class="comment"># Stage ALL changed files in the folder</span>
</div>
</div>
</div>
<div class="workflow-step">
<div class="step-circle" style="background:var(--accent-light);color:var(--accent);">2</div>
<div class="step-body">
<h4>Save a snapshot with <code style="font-family:'DM Mono',monospace;font-weight:400;">git commit</code></h4>
<p>Lock in your staged changes with a short message describing what you did.</p>
<div class="code-block">
<span class="prompt">$ </span><span class="cmd">git commit</span> <span class="flag">-m</span> <span class="arg">"Add lecture notes from week 3"</span>
<br><br><span class="output">[main 3a2f8c1] Add lecture notes from week 3</span>
<br><span class="output"> 1 file changed, 8 insertions(+), 1 deletion(-)</span>
</div>
</div>
</div>
</div>
<div class="callout tip">
<span class="callout-icon">✅</span>
<div><strong>Tip: Write clear commit messages</strong> Future you (and teammates) will be grateful. A good message starts with a verb: "Fix login bug", "Add search feature", "Update README".</div>
</div>
</div>
<!-- ══ SECTION 4: PUSH & PULL ══ -->
<div class="section" id="sec-3">
<div class="section-header">
<div class="section-icon" style="background:#FEF9C3;">🔄</div>
<div>
<h2>git push & git pull</h2>
<p>Syncing changes between your computer and GitHub</p>
</div>
</div>
<p style="color:var(--text-muted);margin-bottom:20px;">Once you've committed locally, your changes still only exist on your machine. <strong>push</strong> sends them to your hosting platform; <strong>pull</strong> brings the latest changes from your hosting platform down to your machine.</p>
<!-- FULL FLOW DIAGRAM -->
<div class="diagram-wrap">
<div class="diagram-label" style="text-align:center;">Complete sync workflow</div>
<div style="display:flex;flex-direction:column;align-items:center;gap:0;max-width:340px;margin:0 auto;">
<!-- Remote repo box (top) -->
<div style="background:#D1FAE5;border:2px solid #6EE7B7;border-radius:10px;padding:16px 20px;text-align:center;width:100%;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#065F46;letter-spacing:.08em;text-align:center;text-transform:uppercase;">☁️ Remote Repository</div>
</div>
<!-- push / pull pills -->
<div style="padding:8px 0;display:flex;justify-content:center;gap:8px;">
<span class="arrow-pill push">↑ push</span>
<span class="arrow-pill pull">pull ↓</span>
</div>
<!-- Local Repository outer box -->
<div style="background:#DBEAFE;border:2px solid #93C5FD;border-radius:10px;padding:16px 20px 20px;width:100%;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#1E40AF;letter-spacing:.08em;text-align:center;text-transform:uppercase;margin-bottom:14px;">🖥 Local Repository</div>
<!-- Saved box -->
<div style="background:#BFDBFE;border:1.5px solid #93C5FD;border-radius:8px;padding:14px 16px;text-align:center;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#1E40AF;">Saved</div>
<div style="font-family:'DM Mono',monospace;font-size:12px;color:#1E40AF;margin-top:3px;">commits</div>
</div>
<!-- git commit pill -->
<div style="padding:8px 0;display:flex;justify-content:center;">
<span class="arrow-pill push" style="background:var(--accent-light);color:var(--accent);">↑ git commit</span>
</div>
<!-- Staging Area box (neutral grey) -->
<div style="background:#F1F5F9;border:1.5px solid #CBD5E1;border-radius:8px;padding:14px 16px;text-align:center;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#475569;">Staging Area</div>
<div style="font-family:'DM Mono',monospace;font-size:12px;color:#64748B;margin-top:3px;">ready to commit</div>
</div>
<!-- git add pill -->
<div style="padding:8px 0;display:flex;justify-content:center;">
<span class="arrow-pill push" style="background:var(--accent-light);color:var(--accent);">↑ git add</span>
</div>
<!-- Draft box (amber) -->
<div style="background:#FEF3E2;border:1.5px solid #FCD34D;border-radius:8px;padding:14px 16px;text-align:center;">
<div style="font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:#B45309;">Draft</div>
<div style="font-family:'DM Mono',monospace;font-size:12px;color:#92400E;margin-top:3px;">edited files</div>
</div>
</div>
</div>
</div>
<div class="workflow-steps" style="margin-top:24px;">
<div class="workflow-step">
<div class="step-circle" style="background:var(--green-light);color:var(--green);">0</div>
<div class="step-body">
<h4>Connect your local machine to your remote repo with <code style="font-family:'DM Mono',monospace;font-weight:400;">git clone</code></h4>
<p>Before you can push or pull, you need a local copy of your remote repository. Run this once to download it and set up the connection automatically.</p>
<div class="code-block">
<span class="prompt">$ </span><span class="cmd">git clone</span> <span class="arg">https://github.com/yourname/git-practice.git</span>
<br><br><span class="output">Cloning into 'git-practice'...</span>
<br><span class="output">remote: Counting objects: 3, done.</span>