-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSoftware_Engineering__git.json
3550 lines (3550 loc) · 147 KB
/
Software_Engineering__git.json
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
{
"__type__": "Deck",
"children": [
{
"__type__": "Deck",
"children": [],
"crowdanki_uuid": "a69e2b7a-6d5b-11e6-adf3-8c705a50cbf0",
"deck_config_uuid": "a69e3016-6d5b-11e6-adf3-8c705a50cbf0",
"desc": "Please see the <a href='https://ankiweb.net/shared/info/2107904924'>shared deck page</a> for more info.",
"dyn": 0,
"extendNew": 10,
"extendRev": 50,
"media_files": [],
"mid": 1408638528289,
"name": "General Information",
"notes": [
{
"__type__": "Note",
"data": "",
"fields": [
"What is the main characteristic of a <b>distributed\n version control system\n (DVCS)</b>?",
"A distributed version control system has no\n central server which\n stores the data. Every local copy contains the full history of the\n source code.\n \n "
],
"flags": 0,
"guid": "b#GLS`mD*f",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Does the use of a\n <b>DVCS</b> require a\n central\n code\n repository?\n \n ",
"No."
],
"flags": 0,
"guid": "CPlCr{/4m(",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Where does Git\n <b>commit</b> file changes to?<br />",
"To the local repository."
],
"flags": 0,
"guid": "O9BDWhx,@(",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What happens when you <b>clone</b> a\n repository with Git?",
"An exact copy of the\n repository is created locally.<br />"
],
"flags": 0,
"guid": "Dkiv9+0iTX",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Does the local clone of a remote repository include the\n complete history of the source code?",
"Yes."
],
"flags": 0,
"guid": "M,[&ZR-I$S",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What's the meaning of <b>master branch</b>?",
"The \"master\" in Git is the default branch, which generally represents the most stable code."
],
"flags": 0,
"guid": "bm{uO(^4b/",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a <b>commit</b>?",
"A commit is a pointer to a spot (revision) on the code history."
],
"flags": 0,
"guid": "LknXA>P{gu",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How are Git commits <b>identified</b>?",
"Instead of numbering commits, Git uses the code contents of the commit to create a unique, 40 character SHA-1 hash."
],
"flags": 0,
"guid": "M!|;;-isLS",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Does a branch created in a repository, which was cloned from another repository, need to have a counterpart in the remote repository?<br /> ",
"No it doesn't."
],
"flags": 0,
"guid": "cr,S-na/4y",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Which two steps are neccessary to persist modifications on a file in the repository?<br />",
"1. Staging (mark the file to be relevant for Git) = adding the file to the index.<br />2. Commiting: storing the changes in the Git repository.<br />"
],
"flags": 0,
"guid": "wp*ChGY&nd",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does the term <b>staging</b> describe?",
"Marking changes as relevant for the version control, by adding them to the index."
],
"flags": 0,
"guid": "s2b*|BtuO2",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a <b>Revision</b>?<br />",
"A revision represents a version of the source code. Git identifies\n revisions\n with SHA-1 IDs using a commit object. SHA-1 IDs are 160 bits long and are\n represented\n in\n hexadecimal. The latest version can be addressed\n via\n HEAD, the version before that via\n HEAD~1\n and so on."
],
"flags": 0,
"guid": "DF$yg5cnTs",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"In which file does Git store <b>global settings</b>?<br />",
"In the <b>.gitconfig</b> file.<br />"
],
"flags": 0,
"guid": "cq9}90`8%l",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Which file tells Git which files and directories to <b>ignore</b>?<br />",
"<pre>.gitignore</pre>"
],
"flags": 0,
"guid": "p{@pLqf8~)",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the difference between <b>local .gitignore</b> and <b>global .gitignore</b> files, regarding visibility?<br />",
"The local\n .gitignore\n file can be committed into the Git repository and\n therefore is visible\n to everyone who clones the repository. The\n global\n .gitignore\n file is only\n locally visible.\n \n "
],
"flags": 0,
"guid": "bALcFrS[,0",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How are <b>empty directories</b> handled under Git version control / by common practice?",
"Git ignores empty directories, i.e. it does not put them under version control. Common practice for tracking an empty directory though, is to put a file called <b>.gitkeep</b> into such a directory.<br />"
],
"flags": 0,
"guid": "julVRci`rj",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does the command <b>git reflog</b> do?<br />",
"It displays the history of the complete changes of the current branch, based on the HEAD revision.<br />"
],
"flags": 0,
"guid": "s$go8!a4M`",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Does <b>git reflog</b> also contain deleted commits?",
"Yes."
],
"flags": 0,
"guid": "o7*md3rMpY",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How is the <b>default branch</b> called in Git?<br />",
"Master."
],
"flags": 0,
"guid": "KQ=K|X^!V@",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does the term <b>merging</b> describe?<br />",
"The process of combining changes of two branches."
],
"flags": 0,
"guid": "IMAr1$Qa%~",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a <b>merge conflict</b>?<br />",
"A merge conflict occurs, if two people have modified the same content and Git cannot automatically determine how both changes should be applied.<br />"
],
"flags": 0,
"guid": "u}r83:+:~S",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does the <b>rebase</b> command do?<br>",
"In general terms - rewrites history. E.g: Combining several commits into<br> one commit. Or replaying changes from one branch on top of the other."
],
"flags": 0,
"guid": "ioQ[YMk002",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What functionality does the <b>stash</b> command add?<br />",
"Saving the current uncommmitted changes and checkout the last committed revision. This allows pulling-in the latest changes or to develop an urgent fix. Afterwards the stashed changes can be restored, which will reapply the changes to the current version of the source code.<br /> "
],
"flags": 0,
"guid": "i`-!UI5`9n",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What's the rule of thumb, concerning the <b>stash</b> command?<br />",
"It should be the exception to using Git. Typically you would create new branches for new features and switch between branches.<br />"
],
"flags": 0,
"guid": "My4;,HZvH:",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a <b>patch file</b>?<br />",
"A text file that contains changes to the source code."
],
"flags": 0,
"guid": "m5arfU*|ZX",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is an <b>alias</b> in Git?",
"An alias in Git allows you to setup your own Git command. E.g. you can define an alias which is a short form of your own favorite commands or you can combine several commands with an alias."
],
"flags": 0,
"guid": "PE`j{-UNE?",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Name two <b>transport types</b> that are supported protocols for Git checkouts",
"The native Git protocol is <b>git</b>, alternatively the <b>http</b> protocol is also supported."
],
"flags": 0,
"guid": "BKdJz<y,i?",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What happens in regards to naming of the original repository, when <b>cloning</b> a remote repository?<br />",
"The original repository will automatically be called \"origin\".<br />"
],
"flags": 0,
"guid": "xDNKnks;P;",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the possibility of using the <b>HTTP protocol</b> with Git especially helpful for?",
"If a firewall blocks all requests other than http.<br />"
],
"flags": 0,
"guid": "ykx4hD1f`?",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Which are the two variants of <b>ssh keys</b>?<br />",
"Public and private.<br />"
],
"flags": 0,
"guid": "K5v/_?3y;F",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does <b>rev~</b> stand for?",
"The first parent of a revision \"rev\""
],
"flags": 0,
"guid": "NvGA`?8=%",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the starting point of the scope of <b>.gitignore</b> files?",
"They define ignore definitions for the whole directory tree, starting from the point where the .gitignore file itself resides."
],
"flags": 0,
"guid": "op.FKBEm<w",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What's the difference between <b>git pull</b> and <b>git fetch</b>? (<span style=\" font-style: normal; font-weight: normal;\">In the simplest terms)</span>",
"git pull does a git fetch followed by a git merge."
],
"flags": 0,
"guid": "j@2Mww$9I{",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the difference between <b>git commit</b> and <b>git push</b>?",
"<b>commit:</b> adding changes to the repository.<div><b>push</b>: to transfer the last commit(s) to a remote server</div>"
],
"flags": 0,
"guid": "n/=o]SCdPT",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the <b>head</b> in Git?",
"The head is a pointer to the current branch, which is in turn the last commit you made or checked out into your working directory."
],
"flags": 0,
"guid": "Dgx!t",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the <b>index</b> in Git?",
"It's a snapshot of changes contained in your next commit, this way it's the \"<b>proposed next commit</b>\"."
],
"flags": 0,
"guid": "KRd1.",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does <b>head^</b> mean?",
"It means the first parent of the tip of the current branch."
],
"flags": 0,
"guid": "gTh:E.xGT7",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the difference between <b>head~</b> and <b>head^</b> ?",
" ~<n> means the revision that is the <n>th generation ancestor of the named revision, following only the first parents.<div>^<n> means the <n>th parent of that revision.</div>"
],
"flags": 0,
"guid": "oSbQ@6YX3O",
"note_model_uuid": "a69ea2c6-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a local version control system?",
"A database of changes kept on the same computer as the files being versioned."
],
"flags": 0,
"guid": "lyLiO",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How is a distributed version control system different from others?",
"Every client has a full backup of all the data."
],
"flags": 0,
"guid": "vL>PF",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the \"snapshot\" concept?",
"In Git, the data is more like a stream of complete snapshots of a mini filesystem rather than a list of file changes like you'll see in SVN, Perforce, etc."
],
"flags": 0,
"guid": "[=E+4",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Why are most git operations so fast?<br>",
"They happen on the local disk, rather than over a network<br>"
],
"flags": 0,
"guid": "nWWq:b)^~N",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How does git maintain file integrity?<br>",
"Everything is SHA-1 checksummed and stored not by filename, but rather hash value of each file's contents.<br>"
],
"flags": 0,
"guid": "j-w#1jS:X.",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What are the 3 git states your files can reside in?<br>",
"committed, modified, and staged<br>"
],
"flags": 0,
"guid": "C4^;Av:G|V",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does it mean when a file is in the \"committed\" state?<br>",
"The data is safely stored in your local database<br>"
],
"flags": 0,
"guid": "d1B#YWuY@B",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does it mean if a file is in the \"modified\" state?<br>",
"You have changed the file, but not yet committed it.<br>"
],
"flags": 0,
"guid": "B*=9usvjro",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does it mean if a file is in the \"staged\" state?<br>",
"You have marked a file in its current state to go into the next commit snapshot.<br>"
],
"flags": 0,
"guid": "fZB+bI=,I[",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What are the 3 sections of a git project?<br />",
"the Git directory (repository), the working directory, and the staging area<br />"
],
"flags": 0,
"guid": "exQD~)OGAp",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is stored in the Git directory?<br>",
"The metadata and object database for your project<br>"
],
"flags": 0,
"guid": "tE7lTjYc[[",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is copied when you clone a repository from another computer?<br>",
"the Git directory<br>"
],
"flags": 0,
"guid": "k,m+XqcVpU",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the working directory?<br>",
"A single checkout of one version of the project. These files are pulled out of the compressed database in the git directory and placed on disk for you to use and modify.<br>"
],
"flags": 0,
"guid": "K.$%A~oaD9",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the staging area?",
"It is a file in the git directory that stores information about what goes into the next commit. It is sometimes referred to as the \"index\"."
],
"flags": 0,
"guid": "L41A}A*]ro",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the 3-step basic git workflow?",
"1. modify files in working directory<div>2. stage files, adding snapshots of them to the staging area</div><div>3. commit, which takes the files in the staging area and stores that snapshot permanently to your git directory</div>"
],
"flags": 0,
"guid": "F*ctH#)=J&",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Where are the three places that git config variables can be stored?",
"1. systemwide: /etc/gitconfig<div>2. per user: ~/.gitconfig or ~/.config/git/config</div><div>3. per project: .git/config</div>"
],
"flags": 0,
"guid": "u(@cQ<B8CM",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What option do you pass to git config to modify system-level configs?",
"--system"
],
"flags": 0,
"guid": "i})V+Dzh9J",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What option do you pass to git config to make changes for specific to your user?",
"--global"
],
"flags": 0,
"guid": "BarEPJKq84",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What are three ways to get help on a git verb?",
"1. git help <verb><div>2. git <verb> --help</div><div>3. man git-<verb></div>"
],
"flags": 0,
"guid": "O`8m5XL4n_",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How do you get a copy of an existing git repository, say https://github.com/libgit2/libgit2<span style=\"line-height: 1.1;\">?</span><br>",
"git clone https://github.com/libgit2/libgit2"
],
"flags": 0,
"guid": "o=}nL8EYm$",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What are a couple different transfer protocols used by git?",
"https://<div>git://</div>"
],
"flags": 0,
"guid": "A}1)?]T`vM",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the difference between a tracked and untracked file?",
"Tracked files are all files that were in the last snapshot. They can be unmodified, modified, or staged. Untracked files are not in the latest snapshot or staged."
],
"flags": 0,
"guid": "Q`hDEs1([I",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Why is it possible for a tracked file to be both in staging and modified state?",
"Because the staged version is the contents of the file at the exact time you ran \"git add\" to stage the file. You have to run \"git add\" again if you've modified it and want to stage the latest contents of the file."
],
"flags": 0,
"guid": "Ft&|}kHYmQ",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What file is used to ignore some untracked files?",
".gitignore"
],
"flags": 0,
"guid": "A(Pz~1U7<!",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the default shortname for cloned repositories?",
"origin"
],
"flags": 0,
"guid": "t;V;(s*,@A",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How does git fetch affect your local repository?",
"It pulls the data, but does not merge or modify your working copy. To actually merge, it must be manually done."
],
"flags": 0,
"guid": "Pj#|SXYy$f",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is stored in a git commit object?",
"* pointer to the snapshot of the staged content<div>* author's name and email</div><div>* commit message</div><div>* pointer to the commit(s) directly before this one</div>"
],
"flags": 0,
"guid": "s]So><?rVW",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a branch in terms of git commit objects?",
"A lightweight movable pointer to one of the commits"
],
"flags": 0,
"guid": "B0mlW%vB3_",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the name of the special pointer which tells you which local branch you're currently on?",
"HEAD"
],
"flags": 0,
"guid": "wx>?/9M3;E",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What happens to the HEAD pointer when you create a new branch?",
"Nothing, it continues to point to the existing branch (such as master, if you haven't changed it yet). It does not switch to the new branch automatically."
],
"flags": 0,
"guid": "rSIJ1yGYe",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What happens to the working directory when you switch branches?",
"The files are updated to reflect the last commit of the branch. If it cannot be updated cleanly, git will not let you switch."
],
"flags": 0,
"guid": "uZYKi_w!c;",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"Why is a git branch cheap?",
"A branch is a simple file that contains the 40 character SHA-1 checksum of the commit it points to."
],
"flags": 0,
"guid": "i}td:;X-$8",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a \"fast-forward\" merge?",
"When you try to merge a commit that can be reached by following the first commit's history, git will simply move the pointer forward because there is no divergent work to merge together. This is known as a \"fast-forward\" merge."
],
"flags": 0,
"guid": "rVbh7YpG/J",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is a merge commit?",
"When two divergent branches are merged, git creates a new snapshot and a new commit that points to it. A merge commit has more than one parent."
],
"flags": 0,
"guid": "I_KQ5^#C&9",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How is git different in dealing with the merge base when merging branches?",
"Git determines the best common ancestor to use for its merge base, which is a lot simpler than many other VCSes."
],
"flags": 0,
"guid": "tgr3Vb|<^/",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What does the leading * character mean in the output of git branch?",
"It indicates the branch you have currently checked out (that HEAD points to)."
],
"flags": 0,
"guid": "B@=#&gvD8$",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the name used for a branching workflow where sets of commits graduate to a more stable silo when they're fully tested?<br>",
"progressive-stability branching<br>"
],
"flags": 0,
"guid": "z/@Lr]Q(#S",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the name for a short-lived branch for a single particular feature or related work?<br>",
"topic branch<br>"
],
"flags": 0,
"guid": "i!X._o?lw1",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What are remote branches?<br>",
"Pointers to the state of branches in remote repositories. They are local branches that you cannot move.<br>"
],
"flags": 0,
"guid": "G#8JF}nb2h",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"When are remote branch pointers updated?<br>",
"They are automatically moved when you do any network communication.<br>"
],
"flags": 0,
"guid": "J6*@RPtUh1",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"When you fetch a remote branch, will it automatically set up a local branch with the same name?",
"No. You must either merge it or create your own branch from it."
],
"flags": 0,
"guid": "Q5})51ApH+",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What is the shorthand for referencing the tracking remote and branch?",
"@{u} or @{upstream}"
],
"flags": 0,
"guid": "tK3qT-!z5k",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"How does rebasing affect the commit history differently than a merge?",
"A rebase will make the commit history look linear/clean rather than a bunch of branch merges. This is often done to make sure your commits apply cleanly to a remote branch."
],
"flags": 0,
"guid": "zcp*jH9a&8",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},
{
"__type__": "Note",
"data": "",
"fields": [
"What one tip should you follow to avoid a drawback of rebasing?",
"Do not rebase commits that exist outside of your repository."
],
"flags": 0,
"guid": "ATWa!RS=Z&",
"note_model_uuid": "a6a07e16-6d5b-11e6-adf3-8c705a50cbf0",
"tags": []
},