-
-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathtutorial.json
More file actions
6163 lines (6163 loc) · 212 KB
/
tutorial.json
File metadata and controls
6163 lines (6163 loc) · 212 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
{
"id": "freeCodeCamp/learn-git-by-building-an-sql-reference-object:v1.0.0",
"version": "2.0.0",
"summary": {
"title": "Learn Git by Building an SQL Reference Object",
"description": "> Welcome to the git lessons!"
},
"config": {
"setup": {
"commands": [
"./.freeCodeCamp/setup.sh",
"cd .freeCodeCamp && npm install"
],
"commits": [
"8012300118d41f88a2d84936d5d802f63b48551f"
]
},
"testRunner": {
"command": "npm run programmatic-test",
"args": {
"tap": "--reporter=mocha-tap-reporter"
},
"directory": ".freeCodeCamp"
},
"repo": {
"uri": "https://github.com/freeCodeCamp/learn-git-by-building-an-sql-reference-object",
"branch": "v2.0.0"
},
"continue": {
"commands": [
"./.freeCodeCamp/setup.sh",
"./.freeCodeCamp/reset.sh"
]
},
"reset": {
"commands": [
"./.freeCodeCamp/setup.sh",
"./.freeCodeCamp/reset.sh"
]
},
"dependencies": [
{
"name": "node",
"version": ">=10"
}
],
"webhook": {
"url": "https://api.freecodecamp.org/coderoad-challenge-completed",
"events": {
"init": false,
"reset": false,
"step_complete": false,
"level_complete": false,
"tutorial_complete": true
}
}
},
"levels": [
{
"id": "10",
"title": "Start Terminal",
"summary": "",
"content": "",
"steps": [
{
"id": "10.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"db2144b367d57d5d4d14ac278c962a377ec654e4"
]
},
"content": "The first thing you need to do is start the terminal. Open a new one by clicking the \"hamburger\" menu at the top left of the window, going to the \"terminal\" section, and clicking \"new terminal\". Once you open a new one, type `echo hello git` into the terminal and press enter.",
"hints": [
"Follow the directions closely",
"If the tests don't pass, trash all the terminals with the trash can icon at the top right of the terminal. Then, redo those instructions"
]
}
]
},
{
"id": "20",
"title": "Make Directory",
"summary": "",
"content": "",
"steps": [
{
"id": "20.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"50ab85a9a1a4e7c59a819babfb0de788118c551e"
]
},
"content": "You should be in the `project` folder in the terminal you opened. Use the terminal to make a new directory named `sql_reference` in the `project` folder. As a reminder, you can use the `mkdir` command to make a new folder.",
"hints": [
"Enter `mkdir sql_reference` in the terminal from the `project` folder",
"Enter `cd ~/project` to get to the `project` folder if you aren't there",
"Don't try to create the folder with another method"
]
}
]
},
{
"id": "30",
"title": "Change Directory",
"summary": "",
"content": "",
"steps": [
{
"id": "30.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"3c40a17407ea3d150832c3884d9439c12c9430f8"
]
},
"content": "Use the \"change directory\" command in the terminal to change to your new folder.",
"hints": [
"Enter `cd sql_reference` into the terminal",
"Make sure you are in the `project` folder first",
"Enter `cd ~/project` to get to the `project` folder if you aren't there"
]
}
]
},
{
"id": "40",
"title": "Initialize a git Repository",
"summary": "",
"content": "",
"steps": [
{
"id": "40.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"77611186e7a6f420d0638a957c0b2b5013edaf25"
]
},
"content": "Git is a version control system to keep track of your code. This folder will be your git repository. Turn it into one by typing `git init` in the terminal from this folder.",
"hints": [
"Enter `git init` into the terminal while in the `sql_reference` folder",
"Make sure you are in the `sql_reference` folder first",
"Enter `cd ~/project/sql_reference` to get to the folder if you aren't there"
]
}
]
},
{
"id": "50",
"title": "View .git Folder",
"summary": "",
"content": "",
"steps": [
{
"id": "50.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"48a34594b66d1f297e04ca739d1842b619dae987"
]
},
"content": "Use the list command with the `-a` flag to list the hidden folders and files.",
"hints": [
"The list command is `ls`",
"Type `ls -a` into the terminal and press enter",
"Make sure you are in the `sql_reference` folder first",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "60",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "60.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"65b3942553e586507a0084536d14032b5b305bc7"
]
},
"content": "The `git init` command created that `.git` folder for you. It's what keeps track of all the things in your repository. Use `git status` to see the status of where you are. This command will be your best friend.",
"hints": [
"Type `git status` into the terminal and press enter",
"Make sure you are in the `sql_reference` folder first",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "70",
"title": "Checkout main Branch",
"summary": "",
"content": "",
"steps": [
{
"id": "70.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"26dbe528fcd1220ffa7df24671fb7afc72190b8f"
]
},
"content": "A git repository has branches to help keep track of things you are doing with your code. It's common to have a `main` branch which might be for your production code, and other branches for adding new features or fixing bugs. You can create and go to a new branch with `git checkout -b new_branch`. The `-b` stands for \"branch\". Use that command to switch to a new branch named `main`.",
"hints": [
"Capitalization matters",
"Type `git checkout -b main` into the terminal",
"Make sure you are in your `sql-reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "80",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "80.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"afcf0eb74841aaf89da04cc6d4fb90ceecac3ce6"
]
},
"content": "Check your status again with `git status`.",
"hints": [
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "90",
"title": "touch README.md",
"summary": "",
"content": "",
"steps": [
{
"id": "90.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"471fb8b52c052cdcee15f2c6779bcdd9cb8fedf0"
]
},
"content": "Now you are on the `main` branch. Use the `touch` command to create `README.md` inside your repository. This is a file you will see in many repos to describe what the repo is for.",
"hints": [
"Use `touch file_name` to create a file",
"Type `touch README.md` into the terminal and press enter",
"Don't try to create the file with another method",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "100",
"title": "Add Readme Text",
"summary": "",
"content": "",
"steps": [
{
"id": "100.1",
"setup": {
"watchers": [
"./sql_reference/README.md"
],
"commits": [
"104cb38a6ffc6b22438426b36cbccbe644fe9ebb"
]
},
"content": "Add the text `SQL Reference` at the top of your new file to let people know what your repo is for.",
"hints": [
"Add the suggested text in your `README.md` file"
]
}
]
},
{
"id": "110",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "110.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"4dc65b915f010d19d979f756cd7fc26d43691b88"
]
},
"content": "Check the status of your repo again.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "120",
"title": "git add README.md",
"summary": "",
"content": "",
"steps": [
{
"id": "120.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"6987a4dd4a430adae7244a688ae8152c061ee9b4"
]
},
"content": "The file you created has not been added to git yet so it is showing that it is untracked. There's two steps to make git keep track of it for you. First you need to add it to the staging area like this: `git add file_name`. Add your `README.md` file to the staging area.",
"hints": [
"Replace `file_name` in the example with your `README.md` file",
"Type `git add README.md` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "130",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "130.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"c41fab1eb5a8fee513b1dcd53a56b6aa4ca1088e"
]
},
"content": "Check your status again.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "140",
"title": "touch sql_reference.json",
"summary": "",
"content": "",
"steps": [
{
"id": "140.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"15091ddbc94c6be0c012a57709770eb8b21e7242"
]
},
"content": "Now your file is in staging and will be added with the next commit. You aren't quite ready to commit this yet though. Use `touch` again to create `sql_reference.json` in your repo.",
"hints": [
"Use `touch file_name` to create a file",
"Type `touch sql_reference.json` into the terminal and press enter",
"Don't try to create the file with another method",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "150",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "150.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"992f3f42a6fcd26099464089b8cccbbce4ae2863"
]
},
"content": "Check your status again.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "160",
"title": "git add Initial commit",
"summary": "",
"content": "",
"steps": [
{
"id": "160.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"728c90de0b86bdd07dce7422da594705bc14aac2"
]
},
"content": "You now have one file in staging and one that is untracked. Add the new file you created to the staging area.",
"hints": [
"Here's the example again: `git add file_name`",
"You added the last one with `git add README.md`",
"Type `git add sql_reference.json` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "170",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "170.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"299f7a0a2b47bc09283582e682003d177dd7e0b0"
]
},
"content": "Check your status one more time please :grin:",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "180",
"title": "git commit Initial commit",
"summary": "",
"content": "",
"steps": [
{
"id": "180.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"24752cde5aa8bca38558b0bead01778fff33886f"
]
},
"content": "Now you have two files in staging. To commit them, you can use `git commit -m \"Initial commit\"`. The `-m` stands for \"message\". Often times, the first commit of a repo will have the message \"Initial commit\". Commit your two files with the message `Initial commit`.",
"hints": [
"Type `git commit -m \"Initial commit\"` in the terminal and press enter",
"Enter `git log` to see if your message is correct",
"If the message is wrong, enter `git reset HEAD~1`, then `git add .`, and then you can try to make the commit again",
"Or, reset the lesson and try again"
]
}
]
},
{
"id": "190",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "190.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"a913cafd67a9b52b5ec205090434484879fec6ed"
]
},
"content": "When you make a commit, whatever is in the staging area will be added to your git history. You can see some info in the terminal output about the commit. Check your status again to see what's there.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "200",
"title": "git log",
"summary": "",
"content": "",
"steps": [
{
"id": "200.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"38b9c70a70ad1b528423a2e8bc8173cf4a1e9163"
]
},
"content": "Your \"working tree\" is clean, the files were committed and there's no other new changes that git recognizes. You can see your commit history with `git log`. Check your commit history.",
"hints": [
"Type `git log` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "210",
"title": "Add CREATE DATABASE Command",
"summary": "",
"content": "",
"steps": [
{
"id": "210.1",
"setup": {
"watchers": [
"./sql_reference/sql_reference.json"
],
"commits": [
"e9144cfcf045dc35873e71bcf844bde39e16966f"
]
},
"content": "You can see the commit you made. It shows the message you gave with the commit, along with your username, email, the date, and a commit hash. The hash is that long string of characters. Open up your `.json` file and create an object with a reference for how to create a database that looks like this:\n\n```json\n{\n \"database\": {\n \"create\": \"CREATE DATABASE database_name;\"\n }\n}\n```\n\nMake sure there's one empty line at the bottom of the file and no extra spaces after the value or any of the curly brackets.",
"hints": [
"Add the suggested object to your `sql_reference.json` file",
"Double check for those extra spaces and the empty line"
]
}
]
},
{
"id": "220",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "220.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"2eef279583896ed1f37c56ba850a59a2bcbdb8db"
]
},
"content": "Check your status again.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "230",
"title": "git diff",
"summary": "",
"content": "",
"steps": [
{
"id": "230.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"9baaaa9b259a76ff1fa86a4b775bd893be6a529f"
]
},
"content": "Git recognizes new unstaged changes to your file. Notice that it says that file is modified instead of untracked because the file has been previously committed. You can see the changes you made with `git diff`. Take a look at the new changes.",
"hints": [
"Type `git diff` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "240",
"title": "git add sql_reference.json",
"summary": "",
"content": "",
"steps": [
{
"id": "240.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"6043fa29607a7bd43c055bf38b3333694bc4c9d8"
]
},
"content": "The lines with `+` in front means that those lines were added. Add your new changes to staging with the `git add` command again. Make sure to put the filename you want to add at the end of the command.",
"hints": [
"You previously used `git add README.md` to add changes to staging",
"Type `git add sql_reference.json` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "250",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "250.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"d4d53392a9507144157c08f44d4f9e1fa24491ea"
]
},
"content": "Check your status.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "260",
"title": "git commit feat: add create database reference",
"summary": "",
"content": "",
"steps": [
{
"id": "260.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"a4ffedc9dc38cd76ebc429a5d60972d9a9815dd2"
]
},
"content": "Your new changes are staged and ready to be committed. Commit them with the message `feat: add create database reference`. As a reminder, here what the command to commit looks like: `git commit -m \"message\"`.",
"hints": [
"Type `git commit -m \"feat: add create database reference\"` into the terminal and press enter",
"View your `git log` to see if your message is correct",
"If the message is wrong, enter `git reset HEAD~1`, then `git add .`, and then you can try to make the commit again",
"Or, reset the lesson and try again",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "270",
"title": "git log",
"summary": "",
"content": "",
"steps": [
{
"id": "270.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"92583e885279b63506e31fe1b7bf880c25068384"
]
},
"content": "Commit messages often start with `fix:` or `feat:`, among others, to help people understand what your commit was for. Check your `git log` again to see the new commit added.",
"hints": [
"Type `git log` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "280",
"title": "Add DROP DATABASE command",
"summary": "",
"content": "",
"steps": [
{
"id": "280.1",
"setup": {
"watchers": [
"./sql_reference/sql_reference.json"
],
"commits": [
"8a7efc4bb42d31970384742d84525c68cba131b5"
]
},
"content": "Now there's two commits in your history, the newest one is at the top :smile: In your JSON file, add a `drop` key to your `database` object. Give it a value for how to drop a database similar to the `create` value. The syntax is in the hints. Again, make sure there's an empty line at the bottom of the file and no extra spaces after any values or curly brackets.",
"hints": [
"The value should be `\"DROP DATABASE database_name;\"`",
"Don't forget the comma at the end of the previous line to make it a valid json object.",
"Your database object should have these values:\n```json\n{\n \"create\": \"CREATE DATABASE database_name;\",\n \"drop\": \"DROP DATABASE database_name;\"\n}\n```",
"The whole file should look like this:\n```json\n{\n \"database\": {\n \"create\": \"CREATE DATABASE database_name;\",\n \"drop\": \"DROP DATABASE database_name;\"\n }\n}\n\n```",
"Make sure there's one empty line at the bottom of the file and no extra spaces after any of the values or curly brackets",
"You can view the `git diff` to see if there's any extra spaces"
]
}
]
},
{
"id": "290",
"title": "git status",
"summary": "",
"content": "",
"steps": [
{
"id": "290.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"eeafa19d17e603f4c8fe8e297b3ccde30735e357"
]
},
"content": "Check your status.",
"hints": [
"Use the \"git status\" command in your repo",
"Type `git status` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "300",
"title": "git diff",
"summary": "",
"content": "",
"steps": [
{
"id": "300.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"437ad884574fdb05a9ce38aee7dbf56695be4eb4"
]
},
"content": "Changes not staged. Check the `diff` quick.",
"hints": [
"Use the \"git diff\" command in your repo",
"Type `git diff` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "310",
"title": "git add DROP DATABASE command",
"summary": "",
"content": "",
"steps": [
{
"id": "310.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"34632cafdb40774dcb93f474d6e91b382909ad1f"
]
},
"content": "It should show one line removed and two lines added. Add your changes to the staging area.",
"hints": [
"You previously used `git add README.md` to add changes to staging",
"Type `git add sql_reference.json` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "320",
"title": "git commit feat: add drop database reference",
"summary": "",
"content": "",
"steps": [
{
"id": "320.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"e90a98ea53203bcc977492c0ed38c9dd02655435"
]
},
"content": "Commit your staged changes with the message, `feat: add drop database reference`",
"hints": [
"Commit changes with `git commit -m \"message\"`",
"Type `git commit -m \"feat: add drop database reference\"` into the terminal and press enter",
"View your `git log` to see if your message is correct",
"If the message is wrong, enter `git reset HEAD~1`, then `git add .`, and then you can try to make the commit again",
"Or, reset the lesson and try again",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "330",
"title": "git log",
"summary": "",
"content": "",
"steps": [
{
"id": "330.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"00778ffb0a770b8984851302b4feb62552c9fcee"
]
},
"content": "I think you're catching on :smile: Check the `log` again.",
"hints": [
"Type `git log` into the terminal and press enter",
"Press `enter` in the terminal to go through the whole log",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "340",
"title": "git branch",
"summary": "",
"content": "",
"steps": [
{
"id": "340.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"e404a6e0a1918413a8825c14dd5d0b4427bdd7be"
]
},
"content": "Now there's three commits :smile: You have been making changes to your `main` branch. You actually want to try and avoid that. Type `git branch` to see the current branches in your repo.",
"hints": [
"Type `git branch` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "350",
"title": "git branch feat/add-create-table-reference",
"summary": "",
"content": "",
"steps": [
{
"id": "350.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"a416ba3f357101a5a70ce07fddb403f4053e32a4"
]
},
"content": "You only have the `main` branch still. You can create a branch with `git branch branch_name`. Branches often start with `fix/` or `feat/`, among others, like commit messages, but they use a forward slash and can't contain spaces. Create a new branch named `feat/add-create-table-reference`.",
"hints": [
"Type `git branch feat/add-create-table-reference` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "360",
"title": "git branch",
"summary": "",
"content": "",
"steps": [
{
"id": "360.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"c1d7b23bf499498b71a23d25e60ca19f4e88a8b4"
]
},
"content": "Your new branch is a clone of the `main` branch since that's the branch you were on when you created it. It will have the same code and commit history as `main` did at the time of the branch creation. View your branches again with `git branch`.",
"hints": [
"Type `git branch` into the terminal and press enter",
"Make sure you are in your `sql_reference` repo folder",
"Enter `cd ~/project/sql_reference` to go to the folder if you aren't there"
]
}
]
},
{
"id": "370",
"title": "git checkout feat/add-create-table-reference",
"summary": "",
"content": "",
"steps": [
{
"id": "370.1",
"setup": {
"watchers": [
"../.bash_history"
],
"commits": [
"1e69791142d25921265bbba176a1585472104a5a"