-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathgit-comics.html
More file actions
1134 lines (1024 loc) · 36.3 KB
/
Copy pathgit-comics.html
File metadata and controls
1134 lines (1024 loc) · 36.3 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>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Git Comics — DevDunia</title>
<meta name="description" content="Learn Git version control the comic-book way! Branches, commits, merges and more explained through panels, characters and epic adventures.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--ink: #1a1410;
--paper: #fdf3e3;
--paper2: #fbe9cc;
--red: #e63946;
--blue: #1d6fb8;
--yellow: #ffd23f;
--green: #3fa34d;
--pink: #ff6b9d;
--purple: #8a4fff;
--orange: #ff8c42;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Comic Neue', cursive;
font-weight: 400;
color: var(--ink);
background-color: var(--paper);
background-image: radial-gradient(var(--ink) 0.5px, transparent 0.6px);
background-size: 14px 14px;
background-attachment: fixed;
min-height: 100vh;
}
.paper-overlay {
position: fixed;
inset: 0;
background: rgba(253,243,227,.78);
pointer-events: none;
z-index: 0;
}
.page-wrap {
position: relative;
z-index: 1;
max-width: 900px;
margin: 0 auto;
padding: 0 16px 60px;
}
/* ── MASTHEAD ── */
.masthead {
background: var(--yellow);
border: 4px solid var(--ink);
border-radius: 6px;
box-shadow: 7px 7px 0 var(--ink);
margin: 18px 0 28px;
padding: 12px 20px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 8px;
}
.masthead-logo {
font-family: 'Bangers', cursive;
font-size: 2.6rem;
letter-spacing: 2px;
color: var(--ink);
-webkit-text-stroke: 1px var(--ink);
text-shadow: 4px 4px 0 var(--red);
line-height: 1;
}
.masthead-logo span { color: var(--red); }
.masthead-meta {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.issue-tag {
font-family: 'Bangers', cursive;
font-size: 1rem;
background: var(--ink);
color: var(--yellow);
padding: 3px 10px;
border-radius: 4px;
letter-spacing: 1px;
}
.date-tag {
font-family: 'Space Mono', monospace;
font-size: .75rem;
background: var(--red);
color: #fff;
padding: 3px 8px;
border: 2px solid var(--ink);
border-radius: 4px;
}
.price-corner {
font-family: 'Bangers', cursive;
font-size: 1.1rem;
background: var(--ink);
color: var(--yellow);
padding: 4px 12px;
border-radius: 4px;
letter-spacing: 1px;
}
/* ── HERO BANNER ── */
.hero-banner {
background: var(--blue);
border: 4px solid var(--ink);
border-radius: 6px;
box-shadow: 7px 7px 0 var(--ink);
padding: 20px 24px;
margin-bottom: 36px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
}
.hero-domain {
font-family: 'Bangers', cursive;
font-size: 2.2rem;
color: #fff;
letter-spacing: 2px;
text-shadow: 3px 3px 0 var(--ink);
}
.hero-domain .mono-accent {
font-family: 'Space Mono', monospace;
font-size: 1.1rem;
font-weight: 700;
display: block;
color: var(--yellow);
text-shadow: 2px 2px 0 var(--ink);
letter-spacing: 0;
margin-top: 2px;
}
.hero-badges {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.badge {
font-family: 'Space Mono', monospace;
font-size: .72rem;
font-weight: 700;
padding: 4px 10px;
border: 2px solid var(--ink);
border-radius: 4px;
box-shadow: 3px 3px 0 var(--ink);
white-space: nowrap;
}
.badge-green { background: var(--green); color: #fff; }
.badge-orange { background: var(--orange); color: #fff; }
.badge-red { background: var(--red); color: #fff; }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-purple { background: var(--purple); color: #fff; }
.hero-cta {
font-family: 'Bangers', cursive;
font-size: 1.3rem;
background: var(--yellow);
color: var(--ink);
border: 3px solid var(--ink);
border-radius: 6px;
box-shadow: 5px 5px 0 var(--ink);
padding: 8px 20px;
cursor: pointer;
letter-spacing: 1px;
text-decoration: none;
display: inline-block;
transition: transform .1s, box-shadow .1s;
}
.hero-cta:active { transform: translate(2px,2px); box-shadow: 3px 3px 0 var(--ink); }
/* ── CHAPTER HEADINGS ── */
.chapter-heading {
display: flex;
align-items: center;
gap: 16px;
margin: 40px 0 8px;
}
.chapter-num {
font-family: 'Bangers', cursive;
font-size: 2.2rem;
background: var(--ink);
color: var(--yellow);
width: 52px;
height: 52px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
border: 3px solid var(--ink);
box-shadow: 4px 4px 0 var(--ink);
}
.chapter-title {
font-family: 'Bangers', cursive;
font-size: 2.4rem;
letter-spacing: 2px;
color: var(--ink);
-webkit-text-stroke: 1px var(--ink);
text-transform: uppercase;
line-height: 1;
}
.chapter-title .accent { color: var(--red); }
.chapter-sub {
font-family: 'Comic Neue', cursive;
font-size: .85rem;
color: var(--ink);
opacity: .7;
margin-bottom: 18px;
font-style: italic;
}
/* ── PANEL GRID ── */
.panel-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 18px;
margin-bottom: 12px;
}
.panel-grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 18px;
margin-bottom: 12px;
}
/* ── CHARACTER PANEL ── */
.char-panel {
background: var(--paper);
border: 4px solid var(--ink);
border-radius: 6px;
box-shadow: 7px 7px 0 var(--ink);
overflow: hidden;
transition: transform .15s, box-shadow .15s;
}
.char-panel:nth-child(odd) { transform: rotate(-0.5deg); }
.char-panel:nth-child(even) { transform: rotate(0.5deg); }
.char-panel:hover { transform: rotate(0deg) translate(-2px,-4px); box-shadow: 10px 10px 0 var(--ink); }
.char-top {
padding: 10px 12px 8px;
display: flex;
align-items: center;
justify-content: space-between;
}
.char-icon {
width: 48px;
height: 48px;
border-radius: 50%;
border: 3px solid var(--ink);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Bangers', cursive;
font-size: 1.4rem;
color: #fff;
flex-shrink: 0;
box-shadow: 3px 3px 0 var(--ink);
}
.char-label {
font-family: 'Space Mono', monospace;
font-size: .65rem;
font-weight: 700;
background: var(--ink);
color: var(--yellow);
padding: 2px 7px;
border-radius: 3px;
letter-spacing: 1px;
text-transform: uppercase;
}
.char-name {
font-family: 'Bangers', cursive;
font-size: 1.7rem;
letter-spacing: 1px;
padding: 0 12px 2px;
line-height: 1;
}
.char-code {
font-family: 'Space Mono', monospace;
font-size: .7rem;
color: #888;
padding: 0 12px 6px;
}
.char-body {
border-top: 3px solid var(--ink);
padding: 10px 12px;
font-size: .88rem;
line-height: 1.45;
}
/* ── SPEECH BUBBLE ── */
.bubble-row {
position: relative;
background: #fff;
border: 3px solid var(--ink);
border-radius: 14px;
padding: 10px 14px;
margin: 10px 12px 16px;
font-size: .82rem;
font-family: 'Comic Neue', cursive;
font-style: italic;
line-height: 1.4;
}
.bubble-row::before {
content: '';
position: absolute;
bottom: -16px;
left: 22px;
border-width: 16px 10px 0;
border-style: solid;
border-color: var(--ink) transparent transparent;
}
.bubble-row::after {
content: '';
position: absolute;
bottom: -12px;
left: 24px;
border-width: 12px 8px 0;
border-style: solid;
border-color: #fff transparent transparent;
}
.flip-hint {
font-family: 'Comic Neue', cursive;
font-size: .75rem;
font-weight: 700;
color: var(--red);
padding: 6px 12px 10px;
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
text-transform: uppercase;
letter-spacing: .5px;
}
/* ── COMMAND CARDS (flip) ── */
.cmd-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 18px;
margin-bottom: 12px;
}
.cmd-card {
perspective: 900px;
min-height: 210px;
cursor: pointer;
}
.cmd-inner {
position: relative;
width: 100%;
height: 100%;
min-height: 210px;
transform-style: preserve-3d;
transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.cmd-card.flipped .cmd-inner { transform: rotateY(180deg); }
.cmd-front, .cmd-back {
position: absolute;
inset: 0;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
border: 4px solid var(--ink);
border-radius: 6px;
box-shadow: 6px 6px 0 var(--ink);
overflow: hidden;
display: flex;
flex-direction: column;
}
.cmd-back { transform: rotateY(180deg); background: var(--paper2); }
.cmd-stripe {
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 12px;
border-bottom: 3px solid var(--ink);
}
.cmd-stripe-label {
font-family: 'Bangers', cursive;
font-size: 1.5rem;
color: #fff;
letter-spacing: 1px;
text-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.cmd-type-tag {
font-family: 'Space Mono', monospace;
font-size: .6rem;
font-weight: 700;
background: rgba(0,0,0,.25);
color: #fff;
padding: 2px 6px;
border-radius: 3px;
letter-spacing: 1px;
}
.cmd-desc {
padding: 10px 12px;
font-size: .88rem;
line-height: 1.45;
flex: 1;
}
.cmd-preview {
background: var(--ink);
color: var(--yellow);
font-family: 'Space Mono', monospace;
font-size: .72rem;
padding: 8px 12px;
border-top: 3px solid var(--ink);
word-break: break-all;
line-height: 1.5;
}
.cmd-hint {
font-family: 'Comic Neue', cursive;
font-size: .73rem;
font-weight: 700;
color: var(--red);
padding: 6px 12px 8px;
text-transform: uppercase;
letter-spacing: .5px;
}
.cmd-back .cmd-stripe { background: var(--ink); }
.cmd-back-body {
padding: 10px 12px;
font-size: .84rem;
line-height: 1.5;
flex: 1;
}
.cmd-back-body strong { font-weight: 700; color: var(--blue); }
.cmd-back code {
font-family: 'Space Mono', monospace;
font-size: .75rem;
background: var(--ink);
color: var(--yellow);
padding: 2px 6px;
border-radius: 3px;
display: inline-block;
margin: 2px 0;
}
/* ── JOURNEY STEPS ── */
.journey {
display: flex;
flex-direction: column;
gap: 0;
margin: 0 0 16px;
}
.journey-step {
display: flex;
align-items: flex-start;
gap: 16px;
padding: 0 0 0 0;
position: relative;
}
.journey-step:not(:last-child)::after {
content: '';
position: absolute;
left: 22px;
top: 48px;
bottom: 0;
width: 4px;
background: var(--ink);
}
.step-num {
width: 44px;
height: 44px;
border-radius: 50%;
border: 4px solid var(--ink);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Bangers', cursive;
font-size: 1.4rem;
color: #fff;
flex-shrink: 0;
box-shadow: 4px 4px 0 var(--ink);
z-index: 1;
position: relative;
}
.step-card {
flex: 1;
background: var(--paper);
border: 4px solid var(--ink);
border-radius: 6px;
box-shadow: 7px 7px 0 var(--ink);
margin-bottom: 22px;
overflow: hidden;
}
.step-card:nth-child(odd) { transform: rotate(-0.4deg); }
.step-card:nth-child(even) { transform: rotate(0.4deg); }
.step-card:hover { transform: rotate(0deg) translate(-2px,-3px); box-shadow: 10px 10px 0 var(--ink); transition: all .15s; }
.step-header {
padding: 10px 14px 6px;
font-family: 'Bangers', cursive;
font-size: 1.5rem;
letter-spacing: 1px;
}
.step-body {
padding: 4px 14px 10px;
font-size: .9rem;
line-height: 1.5;
}
.step-cmd {
display: inline-block;
font-family: 'Space Mono', monospace;
font-size: .75rem;
font-weight: 700;
background: var(--ink);
color: var(--yellow);
padding: 3px 10px;
border-radius: 4px;
border: 2px solid var(--ink);
box-shadow: 2px 2px 0 var(--ink);
margin-top: 6px;
}
/* ── STARBURST ── */
.starburst {
font-family: 'Bangers', cursive;
font-size: 1.4rem;
letter-spacing: 2px;
transform: rotate(-10deg);
display: inline-block;
color: var(--ink);
text-shadow: 3px 3px 0 var(--red);
user-select: none;
}
.starburst-wrap {
text-align: center;
margin: 8px 0 20px;
}
/* ── THE END ── */
.the-end {
text-align: center;
padding: 40px 0 20px;
}
.the-end-text {
font-family: 'Bangers', cursive;
font-size: 5rem;
color: var(--red);
-webkit-text-stroke: 3px var(--ink);
text-shadow: 8px 8px 0 var(--ink);
letter-spacing: 4px;
line-height: 1;
text-transform: uppercase;
}
.the-end-sub {
font-family: 'Comic Neue', cursive;
font-size: .95rem;
font-style: italic;
color: var(--ink);
opacity: .7;
margin-top: 8px;
}
/* ── DIVIDER ── */
.divider {
border: none;
border-top: 4px solid var(--ink);
margin: 8px 0 0;
}
/* color helpers */
.bg-red { background: var(--red); }
.bg-blue { background: var(--blue); }
.bg-yellow { background: var(--yellow); }
.bg-green { background: var(--green); }
.bg-pink { background: var(--pink); }
.bg-purple { background: var(--purple); }
.bg-orange { background: var(--orange); }
.bg-ink { background: var(--ink); }
/* ── RESPONSIVE ── */
@media (max-width: 760px) {
.panel-grid, .cmd-grid { grid-template-columns: 1fr 1fr; }
.panel-grid-2 { grid-template-columns: 1fr; }
.masthead-logo { font-size: 1.9rem; }
.chapter-title { font-size: 1.8rem; }
.the-end-text { font-size: 3.2rem; }
.hero-banner { flex-direction: column; }
.starburst { display: none; }
}
@media (max-width: 480px) {
.panel-grid, .cmd-grid { grid-template-columns: 1fr; }
.chapter-title { font-size: 1.5rem; }
}
</style>
</head>
<body>
<div class="paper-overlay"></div>
<div class="page-wrap">
<!-- MASTHEAD -->
<div class="masthead">
<div class="masthead-logo">GIT <span>COMICS</span></div>
<div class="masthead-meta">
<span class="issue-tag">ISSUE #01</span>
<span class="date-tag">JUNE 2025</span>
</div>
<div class="price-corner">25¢</div>
</div>
<!-- HERO BANNER -->
<div class="hero-banner">
<div>
<div class="hero-domain">git init adventure
<span class="mono-accent">$ git log --oneline --graph</span>
</div>
</div>
<div class="hero-badges">
<span class="badge badge-green">DISTRIBUTED</span>
<span class="badge badge-orange">OPEN SOURCE</span>
<span class="badge badge-red">LINUS 2005</span>
<span class="badge badge-yellow">v2.x</span>
<span class="badge badge-purple">SNAPSHOTS</span>
</div>
<a href="#chapter1" class="hero-cta">READ THE STORY!</a>
</div>
<!-- ══ CHAPTER 1 ══ -->
<div id="chapter1">
<div class="chapter-heading">
<div class="chapter-num">1</div>
<div>
<div class="chapter-title">THE <span class="accent">FOUR REALMS</span></div>
</div>
</div>
<p class="chapter-sub">Where your code actually lives — read left to right!</p>
<hr class="divider">
<div class="panel-grid" style="margin-top:18px;">
<!-- Working Directory -->
<div class="char-panel">
<div class="char-top">
<div class="char-icon bg-orange">📂</div>
<span class="char-label">REALM 1</span>
</div>
<div class="char-name" style="color:var(--orange);">Working Dir</div>
<div class="char-code">your local filesystem</div>
<div class="char-body">The wild, untamed frontier. Every file you can see, edit, and break lives here. Nothing is safe until you snapshot it!</div>
<div class="bubble-row">"I'm where the magic HAPPENS! Also where you accidentally delete things..."</div>
</div>
<!-- Staging Area -->
<div class="char-panel">
<div class="char-top">
<div class="char-icon bg-yellow" style="color:var(--ink);">🧳</div>
<span class="char-label">REALM 2</span>
</div>
<div class="char-name" style="color:var(--ink);">Staging Area</div>
<div class="char-code">.git/index</div>
<div class="char-body">The green room. You carefully choose which changes get into the next commit. Director's cut only — nothing sneaks through!</div>
<div class="bubble-row">"I'm the bouncer. Not everything from working dir gets past me!"</div>
</div>
<!-- Local Repo -->
<div class="char-panel">
<div class="char-top">
<div class="char-icon bg-blue">💾</div>
<span class="char-label">REALM 3</span>
</div>
<div class="char-name" style="color:var(--blue);">Local Repo</div>
<div class="char-code">.git/objects/</div>
<div class="char-body">Your personal time machine. Every commit is a permanent snapshot. The full history of your project lives right here on your disk.</div>
<div class="bubble-row">"I remember EVERYTHING. Every commit, every branch, every mistake."</div>
</div>
<!-- Remote Repo -->
<div class="char-panel">
<div class="char-top">
<div class="char-icon bg-purple">☁️</div>
<span class="char-label">REALM 4</span>
</div>
<div class="char-name" style="color:var(--purple);">Remote Repo</div>
<div class="char-code">origin / github.com</div>
<div class="char-body">The shared universe! GitHub, GitLab, Bitbucket — where teams sync up, open PRs, and the whole world can see your masterwork.</div>
<div class="bubble-row">"I'm the cloud fortress. Push to me when you want teammates to see your work!"</div>
</div>
<!-- Stash -->
<div class="char-panel">
<div class="char-top">
<div class="char-icon bg-green">🧳</div>
<span class="char-label">BONUS REALM</span>
</div>
<div class="char-name" style="color:var(--green);">The Stash</div>
<div class="char-code">refs/stash</div>
<div class="char-body">The junk drawer! Unfinished work you're not ready to commit goes here. Run away, save state, come back later. It's the panic button.</div>
<div class="bubble-row">"Boss asked for a hotfix mid-feature? STASH IT! I'll hold your mess."</div>
</div>
<!-- Reflog -->
<div class="char-panel">
<div class="char-top">
<div class="char-icon bg-pink">🔍</div>
<span class="char-label">SECRET REALM</span>
</div>
<div class="char-name" style="color:var(--pink);">The Reflog</div>
<div class="char-code">.git/logs/HEAD</div>
<div class="char-body">Git's secret diary. Every movement of HEAD is logged here. Accidentally deleted a branch? Forced a reset? Reflog is your undo button.</div>
<div class="bubble-row">"They think I'm invisible. But I see ALL. git reflog will save your life someday."</div>
</div>
</div>
</div>
<div class="starburst-wrap">
<span class="starburst">COMMIT EARLY, COMMIT OFTEN!</span>
<span class="starburst" style="transform:rotate(8deg);text-shadow:3px 3px 0 var(--blue);">NEVER FORCE-PUSH MAIN!</span>
</div>
<!-- ══ CHAPTER 2 ══ -->
<div id="chapter2">
<div class="chapter-heading">
<div class="chapter-num">2</div>
<div>
<div class="chapter-title">THE <span class="accent">CAST</span> OF COMMANDS</div>
</div>
</div>
<p class="chapter-sub">Nine legendary powers — click a card to flip it!</p>
<hr class="divider">
<div class="cmd-grid" style="margin-top:18px;">
<!-- git commit -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-blue">
<span class="cmd-stripe-label">COMMIT</span>
<span class="cmd-type-tag">SNAPSHOT</span>
</div>
<div class="cmd-desc">The Chronicler — takes a permanent, immutable snapshot of everything in staging. Each commit is a node in your timeline, forever.</div>
<div class="cmd-preview">$ git commit -m "your message"</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">COMMIT — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>Write meaningful messages!</strong> Future-you (and teammates) will thank you.<br><br>
<code>git commit --amend</code> fixes the last commit message.<br>
<code>git commit -a -m "msg"</code> stages tracked files automatically.<br><br>
Each commit stores: tree snapshot, author, timestamp, parent hash.
</div>
</div>
</div>
</div>
<!-- git branch -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-green">
<span class="cmd-stripe-label">BRANCH</span>
<span class="cmd-type-tag">POINTER</span>
</div>
<div class="cmd-desc">The Reality Splitter — a branch is just a lightweight pointer to a commit. Create universes for free, merge them back when done!</div>
<div class="cmd-preview">$ git branch feature/login</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">BRANCH — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>Branches are free!</strong> They're just 41-byte files pointing to a commit hash.<br><br>
<code>git branch -d name</code> deletes a merged branch.<br>
<code>git branch -D name</code> force-deletes (careful!).<br>
<code>git branch -a</code> shows all including remotes.
</div>
</div>
</div>
</div>
<!-- git merge -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-red">
<span class="cmd-stripe-label">MERGE</span>
<span class="cmd-type-tag">COMBINE</span>
</div>
<div class="cmd-desc">The Reunifier — brings diverged branches together, weaving timelines into one. Creates a merge commit with two parents. History preserved!</div>
<div class="cmd-preview">$ git merge feature/login</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">MERGE — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>Fast-forward merge</strong> happens when there's no divergence — no merge commit needed!<br><br>
<code>git merge --no-ff</code> forces a merge commit even when fast-forward is possible.<br>
<code>git merge --abort</code> bails out during a conflict.
</div>
</div>
</div>
</div>
<!-- git rebase -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-orange">
<span class="cmd-stripe-label">REBASE</span>
<span class="cmd-type-tag">REWRITE</span>
</div>
<div class="cmd-desc">The Time Traveler — replays your commits onto a new base. Creates a CLEAN linear history. But beware: rewrites history, never on shared branches!</div>
<div class="cmd-preview">$ git rebase main</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">REBASE — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>Golden rule:</strong> Never rebase public history!<br><br>
<code>git rebase -i HEAD~3</code> interactive rebase — squash, reword, drop commits.<br>
<code>git rebase --abort</code> cancels mid-rebase.<br>
<code>git rebase --continue</code> after resolving conflicts.
</div>
</div>
</div>
</div>
<!-- git cherry-pick -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-pink">
<span class="cmd-stripe-label">CHERRY-PICK</span>
<span class="cmd-type-tag">PLUCK</span>
</div>
<div class="cmd-desc">The Surgeon — applies one specific commit from any branch onto your current one. No need for a full merge, just grab the commit you want!</div>
<div class="cmd-preview">$ git cherry-pick a1b2c3d</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">CHERRY-PICK — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>Use case:</strong> hotfix was committed to wrong branch? Cherry-pick it to the right one!<br><br>
<code>git cherry-pick A..B</code> picks a range of commits.<br>
Creates a NEW commit with a different hash but same changes.
</div>
</div>
</div>
</div>
<!-- git reset -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-purple">
<span class="cmd-stripe-label">RESET</span>
<span class="cmd-type-tag">UNDO</span>
</div>
<div class="cmd-desc">The Eraser — moves HEAD backward in time. Three modes: soft (keep changes staged), mixed (unstage), hard (nuke everything). Powerful. Dangerous.</div>
<div class="cmd-preview">$ git reset --soft HEAD~1</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">RESET — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>--soft:</strong> move HEAD, keep index + working tree unchanged.<br>
<strong>--mixed:</strong> move HEAD + unstage, keep working tree (DEFAULT).<br>
<strong>--hard:</strong> move HEAD + destroy all uncommitted changes.<br><br>
<code>git reset --hard</code> is irreversible (unless you use reflog!).
</div>
</div>
</div>
</div>
<!-- git stash -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-yellow" style="border-color:var(--ink);">
<span class="cmd-stripe-label" style="color:var(--ink);">STASH</span>
<span class="cmd-type-tag" style="background:rgba(0,0,0,.15);color:var(--ink);">SHELVE</span>
</div>
<div class="cmd-desc">The Pause Button — saves your messy work-in-progress without a commit so you can switch branches with a clean slate. Resume later!</div>
<div class="cmd-preview">$ git stash push -m "wip login"</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">STASH — PRO TIPS</span></div>
<div class="cmd-back-body">
<code>git stash list</code> — see all stashed states.<br>
<code>git stash pop</code> — apply newest stash + delete it.<br>
<code>git stash apply stash@{2}</code> — apply specific stash, keep it.<br>
<code>git stash branch new-branch</code> — turn a stash into a branch!
</div>
</div>
</div>
</div>
<!-- git log -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-ink">
<span class="cmd-stripe-label" style="color:var(--yellow);">LOG</span>
<span class="cmd-type-tag">HISTORY</span>
</div>
<div class="cmd-desc">The Historian — shows the commit timeline. Pair with flags to get graphs, one-liners, file diffs, or range comparisons. The most powerful viewer!</div>
<div class="cmd-preview">$ git log --oneline --graph --all</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">LOG — PRO TIPS</span></div>
<div class="cmd-back-body">
<code>git log -p</code> show full diffs per commit.<br>
<code>git log --author="Ali"</code> filter by author.<br>
<code>git log --since="2 weeks ago"</code> filter by date.<br>
<code>git log main..feature</code> commits in feature not in main.<br>
<code>git log --follow path/to/file</code> follow file renames.
</div>
</div>
</div>
</div>
<!-- git bisect -->
<div class="cmd-card" onclick="this.classList.toggle('flipped')">
<div class="cmd-inner">
<div class="cmd-front">
<div class="cmd-stripe bg-red">
<span class="cmd-stripe-label">BISECT</span>
<span class="cmd-type-tag">DEBUG</span>
</div>
<div class="cmd-desc">The Detective — binary-searches your commit history to find exactly which commit introduced a bug. Cuts the search space in half every step!</div>
<div class="cmd-preview">$ git bisect start</div>
<div class="cmd-hint">► FLIP TO READ!</div>
</div>
<div class="cmd-back">
<div class="cmd-stripe"><span class="cmd-stripe-label" style="color:var(--yellow)">BISECT — PRO TIPS</span></div>
<div class="cmd-back-body">
<strong>Flow:</strong><br>
<code>git bisect start</code><br>
<code>git bisect bad</code> (current is broken)<br>
<code>git bisect good v1.2.3</code> (this was fine)<br>
Git checks out midpoints, you mark good/bad.<br>
<code>git bisect reset</code> when done. O(log n) bug hunting!
</div>
</div>
</div>