-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
537 lines (483 loc) · 19.3 KB
/
Copy pathindex.html
File metadata and controls
537 lines (483 loc) · 19.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My GitHub + VS Code Workflow</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
line-height: 1.6;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
overflow: hidden;
}
header {
background: #24292e;
color: white;
padding: 30px;
text-align: center;
}
header h1 {
font-size: 2em;
margin-bottom: 10px;
}
.subtitle {
opacity: 0.9;
font-size: 0.95em;
}
.section-header {
background: #f6f8fa;
padding: 20px 30px;
border-bottom: 2px solid #e1e4e8;
border-top: 2px solid #e1e4e8;
margin-top: 30px;
}
.section-header:first-of-type {
margin-top: 0;
border-top: none;
}
.section-title {
font-size: 1.3em;
font-weight: 600;
color: #24292e;
display: flex;
align-items: center;
gap: 10px;
}
.section-desc {
color: #586069;
font-size: 0.9em;
margin-top: 5px;
margin-left: 34px;
}
.workflow {
padding: 30px;
}
.step {
display: flex;
gap: 15px;
margin-bottom: 20px;
padding: 20px;
background: #f6f8fa;
border-radius: 8px;
border-left: 4px solid #0366d6;
transition: all 0.3s ease;
}
.step:hover {
transform: translateX(5px);
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.step-number {
background: #0366d6;
color: white;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
flex-shrink: 0;
}
.step-content {
flex: 1;
}
.step-title {
font-weight: 600;
color: #24292e;
margin-bottom: 8px;
font-size: 1.1em;
}
.step-desc {
color: #586069;
font-size: 0.95em;
margin-bottom: 10px;
}
code {
background: #24292e;
color: #e1e4e8;
padding: 8px 12px;
border-radius: 6px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 0.9em;
display: inline-block;
margin: 4px 0;
}
.note {
background: #fff8c5;
border-left: 4px solid #f9c513;
padding: 12px;
border-radius: 6px;
margin-top: 10px;
font-size: 0.9em;
color: #735c0f;
}
.tip {
background: #ddf4ff;
border-left: 4px solid #54aeff;
padding: 12px;
border-radius: 6px;
margin-top: 10px;
font-size: 0.9em;
color: #0969da;
}
.github-action {
border-left-color: #6f42c1;
}
.github-action .step-number {
background: #6f42c1;
}
.vscode-action {
border-left-color: #007acc;
}
.vscode-action .step-number {
background: #007acc;
}
.git-command {
border-left-color: #28a745;
}
.git-command .step-number {
background: #28a745;
}
.checkbox-wrapper {
margin-top: 10px;
}
input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
margin-right: 8px;
}
.completed .step-title {
text-decoration: line-through;
opacity: 0.6;
}
.completed {
opacity: 0.7;
background: #e1e4e8;
}
@media print {
body { background: white; }
.container { box-shadow: none; }
.step { break-inside: avoid; }
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>🚀 GitHub + VS Code Workflow</h1>
<p class="subtitle">My personal step-by-step guide to creating repos and managing changes</p>
</header>
<div class="workflow">
<!-- INITIAL SETUP SECTION -->
<div class="section-header">
<div class="section-title">📦 Part 1: Initial Repository Setup</div>
<div class="section-desc">Use this when creating a brand new repository</div>
</div>
<!-- Step 1 -->
<div class="step github-action">
<div class="step-number">1</div>
<div class="step-content">
<div class="step-title">Create GitHub Repository</div>
<div class="step-desc">Go to GitHub website and create a new repository</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 2 -->
<div class="step vscode-action">
<div class="step-number">2</div>
<div class="step-content">
<div class="step-title">Setup Local Folder</div>
<div class="step-desc">Create folder on computer and open in VS Code</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 3 -->
<div class="step git-command">
<div class="step-number">3</div>
<div class="step-content">
<div class="step-title">Initialize Git</div>
<div class="step-desc">While in that folder (assuming git is setup and logged in through CLI)</div>
<code>git init</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 4 -->
<div class="step vscode-action">
<div class="step-number">4</div>
<div class="step-content">
<div class="step-title">Create HTML File</div>
<div class="step-desc">Make a file in VS Code called index.html</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 5 -->
<div class="step vscode-action">
<div class="step-number">5</div>
<div class="step-content">
<div class="step-title">Add Your Code</div>
<div class="step-desc">Put your HTML code in it and add style.css and index.js if that is also part of it</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 6 -->
<div class="step git-command">
<div class="step-number">6</div>
<div class="step-content">
<div class="step-title">Check Status (First Time)</div>
<div class="step-desc">See what files are not added (they will show as untracked)</div>
<code>git status</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 7 -->
<div class="step git-command">
<div class="step-number">7</div>
<div class="step-content">
<div class="step-title">Add Files</div>
<div class="step-desc">Add all files or specific ones</div>
<code>git add .</code>
<div style="margin: 5px 0; color: #586069; font-size: 0.9em;">OR</div>
<code>git add filename.html</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 8 -->
<div class="step git-command">
<div class="step-number">8</div>
<div class="step-content">
<div class="step-title">Verify Status</div>
<div class="step-desc">Check if files were added. If not added they will be in red, if added they will be in green</div>
<code>git status</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 9 -->
<div class="step git-command">
<div class="step-number">9</div>
<div class="step-content">
<div class="step-title">Commit Changes</div>
<div class="step-desc">Save your changes with a description</div>
<code>git commit -m "Your description here"</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 10 -->
<div class="step git-command">
<div class="step-number">10</div>
<div class="step-content">
<div class="step-title">First Push Attempt</div>
<div class="step-desc">Try pushing (this may fail without remote, that's okay)</div>
<code>git push</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 11 -->
<div class="step git-command">
<div class="step-number">11</div>
<div class="step-content">
<div class="step-title">Connect to GitHub</div>
<div class="step-desc">From GitHub webpage for new repo, copy and type the remote add origin command</div>
<code>git remote add origin https://github.com/YOURUSERNAME/REPO-NAME.git</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 12 -->
<div class="step git-command">
<div class="step-number">12</div>
<div class="step-content">
<div class="step-title">Set Upstream (If Fatal Error)</div>
<div class="step-desc">If met with a fatal message, set the upstream branch</div>
<code>git push --set-upstream origin main</code>
<div class="note">
💡 This only needs to be done once per repository. After this, regular <code>git push</code> will work.
</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done (if needed)</label>
</div>
</div>
</div>
<!-- Step 13 -->
<div class="step git-command">
<div class="step-number">13</div>
<div class="step-content">
<div class="step-title">Final Push</div>
<div class="step-desc">Push again - should be met with "Everything is up to date" message</div>
<code>git push</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Step 14 -->
<div class="step github-action">
<div class="step-number">14</div>
<div class="step-content">
<div class="step-title">Verify on GitHub</div>
<div class="step-desc">Refresh GitHub webpage and see if contents appear</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- ONGOING CHANGES SECTION -->
<div class="section-header">
<div class="section-title">📝 Part 2: Making Changes to Existing Repo</div>
<div class="section-desc">Use this when adding new files or updating existing ones</div>
</div>
<!-- Change Step 1 -->
<div class="step vscode-action">
<div class="step-number">1</div>
<div class="step-content">
<div class="step-title">Make Changes</div>
<div class="step-desc">In VS Code, add a new file or make changes and make sure to save them</div>
<div class="tip">
💡 Tip: Use Ctrl+S (Windows) or Cmd+S (Mac) to save files
</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Change Step 2 -->
<div class="step git-command">
<div class="step-number">2</div>
<div class="step-content">
<div class="step-title">Check Differences</div>
<div class="step-desc">Type git status to check what is not the same on the GitHub repo - it will appear in red</div>
<code>git status</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Change Step 3 -->
<div class="step git-command">
<div class="step-number">3</div>
<div class="step-content">
<div class="step-title">Stage Changes</div>
<div class="step-desc">Add specific file or all saved changes</div>
<code>git add filename.extension</code>
<div style="margin: 5px 0; color: #586069; font-size: 0.9em;">OR add everything:</div>
<code>git add .</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Change Step 4 -->
<div class="step git-command">
<div class="step-number">4</div>
<div class="step-content">
<div class="step-title">Verify Staging</div>
<div class="step-desc">Type git status again to check to see if they were added</div>
<code>git status</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Change Step 5 -->
<div class="step git-command">
<div class="step-number">5</div>
<div class="step-content">
<div class="step-title">Commit Changes</div>
<div class="step-desc">Add description for your changes</div>
<code>git commit -m "Description of changes"</code>
<div class="note">
⚠️ <strong>Note:</strong> If you do this after adding all new files with <code>git add .</code>, all of their descriptions will be the same as you put in this commit message. If you want separate descriptions for different files, commit them individually.
</div>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Change Step 6 -->
<div class="step git-command">
<div class="step-number">6</div>
<div class="step-content">
<div class="step-title">Final Status Check</div>
<div class="step-desc">Type git status again to check (should show nothing to commit or working tree clean)</div>
<code>git status</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
<!-- Change Step 7 -->
<div class="step git-command">
<div class="step-number">7</div>
<div class="step-content">
<div class="step-title">Push to GitHub</div>
<div class="step-desc">Push finally to the repo</div>
<code>git push</code>
<div class="checkbox-wrapper">
<label><input type="checkbox"> Done</label>
</div>
</div>
</div>
</div>
</div>
<script>
// Add strikethrough effect when checking boxes
document.querySelectorAll('input[type="checkbox"]').forEach(checkbox => {
checkbox.addEventListener('change', function() {
const step = this.closest('.step');
if (this.checked) {
step.classList.add('completed');
} else {
step.classList.remove('completed');
}
});
});
// Double-click code to select (easy copying)
document.querySelectorAll('code').forEach(code => {
code.style.cursor = 'pointer';
code.title = 'Double-click to select all';
code.addEventListener('dblclick', function() {
const range = document.createRange();
range.selectNode(this);
window.getSelection().removeAllRanges();
window.getSelection().addRange(range);
});
});
</script>
</body>
</html>