-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathconfig.json
More file actions
1444 lines (1444 loc) · 73.4 KB
/
config.json
File metadata and controls
1444 lines (1444 loc) · 73.4 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
{
"config": {
"repoName": "my_project",
"_comment": "errorComando, in case of no command match",
"errorComando": "command not found",
"success": "Success!",
"emptyFolderMessage": "No files in this folder yet",
"emptyStageAreaMessage": "No files to commit",
"emptyCommitsAreaMessage": "Nothing commited yet",
"_comment2": "if user writes 'git', show following error",
"errorMessages": [
"usage: git [--version] [--exec-path[=<path>]]",
" [-p|--paginate|--no-pager]",
" [--git-dir=<path>] [--work-tree=<path>]",
" [-c name=value] [--help]",
" <command> [<args>]",
" "
],
"_comment3": "the following field must have the parragraph tag to work properly. You can add as many as you need.",
"tutorialCompletedMessage": "<p>Well done!</p>"
},
"lecciones": {
"es": {
"1": {
"orden": "1",
"titulo": "¿Quieres aprender a usar Git?",
"tituloCorto": "¿Quieres aprender Git?",
"tareas": [
"Git es un <em>sistema de control de versiones distribuido</em> que permite a equipos de trabajo tratar con un mismo documento o código al mismo tiempo, evitando choques entre los miembros.",
"En la terminal que puedes ver en pantalla hemos creado un <em>repositorio</em>, un contendor de archivos. Para inicializar un repositorio en Git debes escribir el siguiente comando: <strong>git init</strong>."
],
"comando": "git init",
"alert": "Did not create a Git repo",
"successMessages": [
"Initialized empty Git repository in /.git/"
],
"repoStatus": {}
},
"2": {
"orden": "2",
"titulo": "Revisando el status del repositorio",
"tituloCorto": "Revisando el status",
"tareas": [
"Bien hecho. Has logrado crear tu primer repositorio. Ahora en nuestro repositorio se ha creado una carpeta llamada <strong>/.git/</strong>. Si creas un repositorio en tu equipo, esta carpeta estará oculta. En ella se encuentran una serie de subdirectorios con archivos que contienen referencias a todos los cambios que han ocurrido en tu repositorio.",
"Ahora, usando el comando <strong>git status</strong> veamos cuál es el estado actual de nuestro repositorio."
],
"comando": "git status",
"alert": "Did not use git status",
"successMessages": [
"# On branch master",
"#",
"# Initial commit",
"#",
"nothing to commit",
"(create/copy files and use \"git add\" to track)"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"mi_plan.txt"
]
}
},
"3": {
"orden": "3",
"titulo": "Agregar archivos y hacer commit",
"tituloCorto": "Primer uso del repositorio",
"tareas": [
"Si a lo largo de este tutorial sientes que en tu terminal hay demasiado texto, puedes usar el comando <strong>clear</strong> para limpiar todo el contenido de ella.",
"Sigamos. Imagina que agregas un nuevo archivo llamado <strong>mi_plan.txt</strong> a tu repositorio.",
"Ahora, si usamos de nuevo el comando <strong>git status</strong> podrás notar que el estado de tu repositorio ha cambiado."
],
"comando": "git status",
"alert": "Did not use git status",
"successMessages": [
"# On branch master",
"#",
"# Initial commit",
"#",
"# Untracked files:",
"# (use \"git add <file>...\" to include files)",
"#",
"# <strong class=\"red\">mi_plan.txt</strong>",
"nothing added to commit",
"but untracked files present",
"(use 'git add' to track)"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"mi_plan.txt"
]
}
},
"4": {
"orden": "4",
"titulo": "Haciendo cambios",
"tituloCorto": "Haciendo cambios",
"tareas": [
"¿Notaste cómo el archivo <strong>mi_plan.txt</strong> apareció como <strong>untracked</strong> en la terminal?",
"Eso significa que el archivo es nuevo y Git aún no está siguiendo sus cambios.",
"Para que Git pueda seguir todos los cambios que se realicen en el archivo, primero debemos agregarlo a la zona de preparación o <strong>Stage</strong> con el comando <strong>git add [nombre del archivo]</strong>."
],
"comando": "git add mi_plan.txt",
"alert": "Did not add mi_plan.txt",
"successMessages": [
"<span class=\"success\">¡Bien hecho! mi_plan.txt ha sido agregado al <strong>Stage</strong></span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"mi_plan.txt"
],
"staged": [
"mi_plan.txt"
]
}
},
"5": {
"orden": "5",
"titulo": "Revisando los cambios",
"tituloCorto": "Revisando los cambios",
"tareas": [
"¡Excelente! Ahora que git ya está pendiente de los cambios de nuestro archivo, podemos usar de nuevo el comando <strong>git status</strong> para asegurarnos de que todo está bien."
],
"comando": "git status",
"alert": "Did not use git status",
"successMessages": [
"# On branch master",
"#",
"# Initial commit",
"#",
"# Changes to be committed:",
"# (use \"git rm --cached <file>...\" to unstage)",
"#",
"# <span class=\"green\">new file: mi_plan.txt</span>",
"#"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"mi_plan.txt"
],
"staged": [
"mi_plan.txt"
]
}
},
"6": {
"orden": "6",
"titulo": "Haciendo commit",
"tituloCorto": "Haciendo commit",
"tareas": [
"Ahora con tu archivo preparado y en el <strong>Stage</strong> podemos seguir con el siguiente paso, hacer <strong>commit</strong>.",
"Hacer <strong>commit</strong> es simplemente enviar nuestros cambios desde el <strong>Stage</strong> a nuestro repositorio. Si así quisieras, podrías agregar y quitar archivos del <strong>Stage</strong> antes de hacer commit.",
"Para guardar tus cambios en el repositorio usamos el comando <strong>git commit -m</strong> seguido de un mensaje que describa los cambios que hemos realizado. En este caso, solo hemos agregado un nuevo archivo, así que solo escribiremos <i>Agregar mi_plan.txt</i> entre comillas."
],
"comando": "git commit -m \"Agregar mi_plan.txt\"",
"alert": "Did not use git commit",
"successMessages": [
"[master (root-commit) 20b5ccd] Agregar mi_plan.txt",
"1 file changed, 1 insertion(+)",
"create mode 100644 mi_plan.txt",
" "
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt"
]
}
},
"7": {
"orden": "7",
"titulo": "Agregando varios archivos",
"tituloCorto": "Agregando varios archivos",
"tareas": [
"Nuestro repositorio ya tiene un commit. Pero ahora, imagina que has estado trabajando todo el día en tu proyecto y has terminado creando varios archivos de texto. Usar el comando <strong>git add</strong> para agregarlos uno a uno es bastante fastidioso, ¿verdad? Pues Git nos ofrece un metodo un poco más comodo.",
"Para ello usaremos el comando <strong>git add \"*.txt\"</strong> el cual agregará todos los archivos de texto que hayan sido editados en nuestro repositorio."
],
"comando": "git add \"*.txt\"",
"alert": "Did not use git add",
"successMessages": [
"<span class=\"success\">Archivos agregados</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"staged": [
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt"
]
}
},
"8": {
"orden": "8",
"titulo": "Revertir el Stage",
"tituloCorto": "Git reset",
"tareas": [
"Así como <strong>git add</strong> envía tus archivos editados al <strong>Stage</strong>, existe el comando <strong>git reset</strong> que hace todo lo contrario. Retira los archivos del <strong>Stage</strong>.",
"Este comando puede recibir los mismos argumentos que hemos visto hasta ahora con <strong>git add</strong>.",
"Probemos retirando los archivos de texto que acabamos de agregar al <strong>Stage</strong>."
],
"comando": "git reset",
"alert": "Did not use git reset",
"successMessages": [
"<span class=\"success\">Los archivos de texto ya no están en el <strong>Stage</strong></span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt"
]
}
},
"9": {
"orden": "9",
"titulo": "Agregando archivos de nuevo",
"tituloCorto": "Git add #2",
"tareas": [
"Como podrás notar nuestros archivos de texto ya no están en en la zona de preparación.",
"Ahora, volvamos a agregarlos."
],
"comando": "git add \"*.txt\"",
"alert": "Did not use git add",
"successMessages": [
"<span class=\"success\">Archivos agregados</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"staged": [
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt"
]
}
},
"10": {
"orden": "10",
"titulo": "Volviendo a hacer commit",
"tituloCorto": "Haciendo commit #2",
"tareas": [
"Hagamos un commit con los nuevos cambios.",
"¿Qué te parece usar el mensaje <em>Agregar todos los archivos de texto</em>?"
],
"comando": "git commit -m \"Agregar todos los archivos de texto\"",
"alert": "Did not use git commit",
"successMessages": [
"[master (root-commit) 3852b4d]",
"'Agregar todos los archivos de texto'",
"3 file changed, 3 insertion(+)",
"create mode 100644 desarrollo.txt",
"create mode 100644 maquetado.txt",
"create mode 100644 reuniones_del_mes.txt",
" "
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto"
]
}
},
"11": {
"orden": "11",
"titulo": "Revisando el historial con git log",
"tituloCorto": "Usado git log",
"tareas": [
"¿Qué tal? Ya llevamos dos commits hasta ahora.",
"Git nos ofrece un comando que permite revisar un historial con todos los commits que hemos hecho hasta el momento en orden cronológico. Este comando es <strong>git log</strong>"
],
"comando": "git log",
"alert": "Did not use git log",
"successMessages": [
"<span class=\"yellow\">commit: 3852b4db1634463d0bb4d267edb7b3f9cd02ace1</span>",
"Author: 4Geeks Student <student@4geeksacademy.co>",
"Date: Fri Sep 19 18:30:00 2017 -0400",
" Agregar mi_plan.txt",
" ",
"<span class=\"yellow\">commit: b652edfd888cd3d5e7fcb857d0dabc5a0fcb5e28</span>",
"Author: 4Geeks Student <student@4geeksacademy.co>",
"Date: Thu Sep 18 18:00:32 2017 -0400",
" Agregar todos los archivos de texto"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto"
]
}
},
"12": {
"orden": "12",
"titulo": "Manejando repositorios remotos",
"tituloCorto": "Git remote",
"tareas": [
"Bien, ya hemos aprendido los comandos más básicos de Git. Ahora veamos su utilidad práctica. Imagina que quieres que otras personas tengan acceso a tu repositorio. Para lograr debes subir nuestro repositorio a una plataforma como <strong><a href='https://github.com/' target='_blank'>GitHub</a></strong> que se encarga resguardar repositorios publicos y privados en sus servidores.",
"Ahora, una vez creado un repositorio en GitHub tendremos que asociarlo a nuestro repositorio local, para ello usamos <strong>git remote add</strong> seguido del nombre con el cual queremos asociar el repositorio remoto que deseamos agregar y de su URL. Se acostumbra llamar al repositorio remoto principal <strong>origin</strong>, así que haremos eso. Y su URL es <strong>https://github.com/4geeksAcademy/project.git</strong>. Esta vez no son necesarias las comillas."
],
"comando": "git remote add origin https://github.com/4geeksAcademy/project.git",
"alert": "Did not use git remote add",
"successMessages": [
"<span class=\"success\">Repositorio agregado con éxito</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto"
]
}
},
"13": {
"orden": "13",
"titulo": "Usando git push",
"tituloCorto": "Git push",
"tareas": [
"Una vez asociado nuestro repositorio local solo tenemos que subir nuestros archivos locales a ese repositorio en línea, a esto se le llama hacer un <strong>push</strong>.",
"Para hacerlo usamos el comando <strong>git push -u</strong> seguido del nombre del repositorio remoto a donde queremos hacer el push (origin) y luego el nombre de la <em>rama</em> del repositorio local donde están nuestros archivos. Por defecto, al inicializar un repositorio se crea una rama local llamada <strong>master</strong>, allí están nuestros documentos.",
"¿Qué tal si lo intentas?"
],
"comando": "git push -u origin master",
"alert": "Did not use git push",
"successMessages": [
"Branch master set up to track remote branch"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto"
]
}
},
"14": {
"orden": "14",
"titulo": "Usando git pull",
"tituloCorto": "Git pull",
"tareas": [
"Es bueno que siempre trabajes con la versión más actual de tu repositorio, es por ello que antes de hacer cualquier cosa siempre actualices tu repositorio local porque tal vez algún miembro de tu equipo ha realizado algún cambio importante",
"Para actualizar nuestro repositorio local usamos <strong>git pull</strong> seguido del nombre del repositorio en línea de donde copiaremos los archivos (origin) y luego el nombre de la rama de nuestro repositorio local donde deseamos que se copien (master)."
],
"comando": "git pull origin master",
"alert": "Did not use git pull",
"successMessages": [
"Updating 3852b4d..3e70b0f",
"Fast-forward",
" resumen_mensual.txt | <span class=\"green\">1+</span>",
" 1 file changed, 1 insertion(+)",
" create mode 100644 resumen_mensual.txt"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"15": {
"orden": "15",
"titulo": "Observando las ediciones con git diff",
"tituloCorto": "Git diff",
"tareas": [
"¿Notas algo diferente en la carpeta de tu repositorio?",
"Parece que un miembro de tu equipo ha editado nuestro archivo mi_plan.txt y ha hecho un push al repositorio en GitHub. Antes de comenzar a trabajar creo que mejor revisamos qué cambios realizó nuestro compañero.",
"Para ello podemos usar el comando <strong>git diff HEAD</strong> donde HEAD es una referencia al commit más reciente."
],
"comando": "git diff HEAD",
"alert": "Did not use git diff",
"successMessages": [
"diff --git a/mi_plan.txt b/mi_plan.txt",
"index 7d8d808..e725ef6 100644",
"--- a/mi_plan.txt",
"+++ b/mi_plan.txt",
"<span class=\"blue\">@@ -1 +1 @@</span>",
"<span class=\"red\">-Realizar reuniones mensuales</span>",
"<span class=\"green\">+Realizar reuniones quincenales</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"16": {
"orden": "16",
"titulo": "Eliminando cambios",
"tituloCorto": "Git checkout",
"tareas": [
"Bien, ya podemos ver las diferencias. Ahora, imagina que luego de unos minutos de trabajo has realizado un par de cambios en <strong>reuniones_del_mes.txt</strong>, pero resulta que has cometido un error. Podemos deshacer estos cambios con un comando de Git.",
"Para ello, usamos el comando <strong>git checkout</strong> seguido del nombre del archivo al cual deseas eliminarle los cambios."
],
"comando": "git checkout \"reuniones_del_mes.txt\"",
"alert": "Did not use git checkout",
"successMessages": [
"<span class=\"green\">Cambios eliminados</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"17": {
"orden": "17",
"titulo": "Trabajando con ramas",
"tituloCorto": "Ramificación",
"tareas": [
"¿Recuerdas que dijimos que Git permitía a un equipo de trabajo tratar con un mismo código sin problemas? Bueno, esto es posible gracias a la ramificación del código.",
"Git permite crear <strong>ramas</strong> o <strong>branches</strong>. Estas son copias de tu código en las que puedes trabajar sin afectar la versión original.",
"¿Por qué no creamos una? Para ello usa el comando <strong>git branch</strong> seguido del nombre de la rama. Llamaremos a la nuestra <strong>mi_version</strong>."
],
"comando": "git branch mi_version",
"alert": "Did not use git branch",
"successMessages": [
"<span class=\"green\">Rama creada</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"18": {
"orden": "18",
"titulo": "Cambiando de ramas",
"tituloCorto": "Ramificación #2",
"tareas": [
"Bien, hemos creado una nueva rama. Pero como puedes ver a tu derecha en la sección <strong>Root folder</strong> aún seguimos en la rama principal <strong>master</strong>. Si queremos trabajar con nuestra copia debemos cambiar de <strong>rama</strong>.",
"Para hacerlo usamos el comando <strong>git checkout</strong> seguido del nombre de la rama."
],
"comando": "git checkout mi_version",
"alert": "Did not use git checkout",
"successMessages": [
"Switched to branch 'mi_version'"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"19": {
"orden": "19",
"titulo": "Realizando cambios en nuestra rama",
"tituloCorto": "Ramificación #3",
"tareas": [
"Como podrás notar, ya estamos en nuestra rama. Ahora, ¿qué tal si organizamos un poco mejor nuestro proyecto? Hemos creado una carpeta llamada <strong>tareas</strong> y allí moveremos los archivos que están en <strong>planes_septiembre</strong> y <strong>planes_octubre</strong>.",
"Hemos hecho esto por ti, como puedes ver en <strong>Root folder</strong>. Ahora, a veces es algo tedioso tener que agregar los archivos al <strong>Stage</strong> y luego hacer commit. Es por ello que Git nos permie agregar <strong>-a</strong> al comando <strong>git commit</strong> el cual se hará cargo de agregar todos los archivos editados al <strong>Stage</strong> e inmediatamente hacer commit.",
"Bien, ejecuta el comando correspodiente y agrega el mensaje: <em>Reorganizar el proyecto</em>."
],
"comando": "git commit -a -m \"Reorganizar el proyecto\"",
"alert": "Did not use git commit",
"successMessages": [
"[mi_version a5cd2f1] Reorganizar proyecto",
" 2 files changed, 0 insertions(+), 0 deletions(-)",
" rename {1 => tareas}/desarrollo.txt",
" rename {1 => tareas}/maquetado.txt"
],
"repoStatus": {
"branch": "mi_version",
"repoFolder": [
{ ".git": [ ] },
{ "tareas" :
[
"desarrollo.txt",
"maquetado.txt"
]
},
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt",
"a5cd2f1 - Reorganizar el proyecto"
]
}
},
"20": {
"orden": "20",
"titulo": "Regresando a la rama principal",
"tituloCorto": "Ramificación #4",
"tareas": [
"Ahora que ya hemos hecho un commit de nuestros cambios, debemos unirlo a la rama principal para que todo nuestro equipo trabaje con la misma estructura. Para ello primero debemos regresar a la rama principal usando el comando <strong>git checkout master</strong>."
],
"comando": "git checkout master",
"alert": "Did not use git checkout",
"successMessages": [
"Switched to branch 'master'"
],
"repoStatus": {
"branch": "mi_version",
"repoFolder": [
{ ".git": [ ] },
{ "tareas" :
[
"desarrollo.txt",
"maquetado.txt"
]
},
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"21": {
"orden": "21",
"titulo": "Uniendo nuestros cambios a Master",
"tituloCorto": "Git merge",
"tareas": [
"Como podrás ver la rama <strong>master</strong> no ha sido alternada y todavía tiene la versión anterior de la estructura de nuestras carpetas. ¿Qué tal si aplicamos los cambios que hicimos en nuestra versión a la rama principal?",
"Para ello usa el comando <strong>git merge</strong>. Esto lo que hará será tomar los cambios realizados en <strong>mi_version</strong> y unirlos a <strong>master</strong>."
],
"comando": "git merge mi_version",
"alert": "Did not use git merge",
"successMessages": [
"Updating 7d8d808..ec6888b",
"Fast-forward",
" {1 => tareas}/desarrollo.txt | 0",
" {1 => tareas}/maquetado.txt | 0",
" 2 files changed, 0 insertions(+), 0 deletions(-)",
" rename {1 => tareas}/desarrollo.txt",
" rename {1 => tareas}/maquetado.txt"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "planes_septiembre" : [ "desarrollo.txt" ] },
{ "planes_octubre" : [ "maquetado.txt" ] },
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt"
]
}
},
"22": {
"orden": "22",
"titulo": "Eliminando ramas en desuso",
"tituloCorto": "Eliminan ramas",
"tareas": [
"Ya que hemos unido nuestros cambios a la rama principal y ya no usaremos más <strong>mi_vesion</strong>, ¿por qué no eliminamos esa rama?",
"Siempre es bueno eliminar ramas en desuso, ya que a lo largo de un proyecto pueden generarse muchas ramas y debemos evitar que nuestros compañeros se confundan al usar ramas desactualizadas.",
"Para ello usamos el comando <strong>git branch -d</strong> seguido del nombre de la rama a eliminar: <strong>mi_version</strong>."
],
"comando": "git branch -d mi_version",
"alert": "Did not use git branch",
"successMessages": [
"Deleted branch mi_version (was a5cd2f1)."
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "tareas" :
[
"desarrollo.txt",
"maquetado.txt"
]
},
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt",
"a5cd2f1 - Reorganizar el proyecto"
]
}
},
"23": {
"orden": "23",
"titulo": "Compartiendo nuestro proyecto",
"tituloCorto": "Git push #2",
"tareas": [
"Ya habiendo realizado todos los cambios necesarios es hora de que nuestro equipo comience a trabajar con nuestro repositorio.",
"Así que subamoslo a GitHub para ponernos en marcha."
],
"comando": "git push",
"alert": "Did not use git push",
"successMessages": [
"To https://github.com/4geeksAcademy/project.git",
"a5cd2f1..a629e2a master -> master"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "tareas" :
[
"desarrollo.txt",
"maquetado.txt"
]
},
"reuniones_del_mes.txt",
"mi_plan.txt"
],
"commits": [
"20b5ccd - Agregar mi_plan.txt",
"3852b4d - Agregar todos los archivos de texto",
"7d8d808 - Editar frecuencia de reuniones en mi_plan.txt",
"a5cd2f1 - Reorganizar el proyecto"
]
}
}
},
"en": {
"1": {
"orden": "1",
"titulo": "Want to learn some Git?",
"tituloCorto": "Learn Git",
"tareas": [
"Git is a <em>distributed version control system</em> that allows people and teams to collaborate, editing the same document or code at the same time, without conflicts,",
"In the terminal displayed on the lower part of your screen, we have created a <em>repository</em>, a container of files. To initialize the repository, type the following command: <strong>git init</strong>."
],
"comando": "git init",
"alert": "Did not create a Git repo",
"successMessages": [
"Initialized empty Git repository in /.git/"
],
"repoStatus": {}
},
"2": {
"orden": "2",
"titulo": "Checking your repo",
"tituloCorto": "Repo status",
"tareas": [
"Well done. You have created your first repository. The <strong>git init</strong> command adds a hidden subfolder within the existing directory named <strong>/.git/</strong>. If you create a git repository in your computer, this folder will be hidden. This hidden folder contains subfolders and files that reference every change you did in your repository after initializing it.",
"Now let's check the current status of our repository with the command: <strong>git status</strong>."
],
"comando": "git status",
"alert": "Did not use git status",
"successMessages": [
"# On branch master",
"#",
"# Initial commit",
"#",
"nothing to commit",
"(create/copy files and use \"git add\" to track)"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"my_plan.txt"
]
}
},
"3": {
"orden": "3",
"titulo": "Start working on the new repo",
"tituloCorto": "Getting started",
"tareas": [
"If at any point during this tutorial you feel your terminal is too cluttered with text, you can clear its contents with the <strong>clear</strong> command.",
"Let's continue. Let's imagine we added a new file called <strong>my_plan.txt</strong> in the repository.",
"Use again the command <strong>git status</strong> now. You will notice that the status of the repository has changed ."
],
"comando": "git status",
"alert": "Did not use git status",
"successMessages": [
"# On branch master",
"#",
"# Initial commit",
"#",
"# Untracked files:",
"# (use \"git add <file>...\" to include files)",
"#",
"# <strong class=\"red\">my_plan.txt</strong>",
"nothing added to commit",
"but untracked files present",
"(use 'git add' to track)"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"my_plan.txt"
]
}
},
"4": {
"orden": "4",
"titulo": "Adding and updating files",
"tituloCorto": "Adding and updating files",
"tareas": [
"The output of the <strong>git status</strong> command is telling us that <strong>my_plan.txt</strong> is <strong>untracked</strong>",
"This means that the new file has not yet been added to the Git tracking process",
"To have Git to track this file, type the command <strong>git add [file name]</strong>. This process is called <strong>Staging</strong>, or moving files to the <strong>Staging index tree</strong>, meaning our changes are ready to be committed"
],
"comando": "git add my_plan.txt",
"alert": "Did not add my_plan.txt",
"successMessages": [
"<span class=\"success\">Well done! my_plan.txt has been <strong>Staged</strong></span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"my_plan.txt"
],
"staged": [
"my_plan.txt"
]
}
},
"5": {
"orden": "5",
"titulo": "Reviewing changes",
"tituloCorto": "Reviewing changes",
"tareas": [
"Excellent! Now that we made Git aware of the changes in our file, let's check again the status with the <strong>git status</strong> command to make sure everything is good."
],
"comando": "git status",
"alert": "Did not use git status",
"successMessages": [
"# On branch master",
"#",
"# Initial commit",
"#",
"# Changes to be committed:",
"# (use \"git rm --cached <file>...\" to unstage)",
"#",
"# <span class=\"green\">new file: my_plan.txt</span>",
"#"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"my_plan.txt"
],
"staged": [
"my_plan.txt"
]
}
},
"6": {
"orden": "6",
"titulo": "Committing your staged changes",
"tituloCorto": "Committing changes",
"tareas": [
"Now that our changes are <strong>Staged</strong>, we are ready to <strong>commit</strong> the changes.",
"<strong>Commit</strong> means simply to that our <strong>Staged</strong> changes are ready to be added to our repository. If you wish, you can add or remove files and add them to the <strong>Staging index</strong> them as necessary before committing the changes",
"To save the changes in our repository, use the command <strong>git commit -m</strong> followed by a commit message that briefly states what exactly happened in between the last version and this. In this case, we added a new archive in an empty repository, so the commit message will be simple: <i>Added my_plan.txt</i> (enclosed in double quotes)."
],
"comando": "git commit -m \"Added my_plan.txt\"",
"alert": "Did not use git commit",
"successMessages": [
"[master (root-commit) 20b5ccd] Added my_plan.txt",
"1 file changed, 1 insertion(+)",
"create mode 100644 my_plan.txt",
" "
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
"my_plan.txt"
],
"commits": [
"20b5ccd - Added my_plan.txt"
]
}
},
"7": {
"orden": "7",
"titulo": "Adding multiple files",
"tituloCorto": "Adding multiple files",
"tareas": [
"Our repository already has one commit. But what if you have been working all day in this project, and now you have a few new text files to commit? Adding them one by one with the <strong>git add</strong> command is quite tedious, right? No worries, Git has a better method to add multiple files.",
"Type the command <strong>git add \"*.txt\"</strong>, in order to add all the text tiles that have been added or edited in our repository."
],
"comando": "git add \"*.txt\"",
"alert": "Did not use git add",
"successMessages": [
"<span class=\"success\"Added files</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "september_plans" : [ "development.txt" ] },
{ "october_plans" : [ "mockup.txt" ] },
"monthly_meetings.txt",
"my_plan.txt"
],
"staged": [
{ "september_plans" : [ "development.txt" ] },
{ "october_plans" : [ "mockup.txt" ] },
"monthly_meetings.txt"
],
"commits": [
"20b5ccd - Added my_plan.txt"
]
}
},
"8": {
"orden": "8",
"titulo": "Revert to Stage",
"tituloCorto": "Git reset",
"tareas": [
"We know that the <strong>git add</strong> command sends edited files to the <strong>Staging index</strong>. The command <strong>git reset</strong> does the the exact opposite: It reverts to the previous state of <strong>Stage</strong>.",
"This command accepts the same arguments as <strong>git add</strong>.",
"Let's try to reset the last files we added to <strong>Stage</strong>."
],
"comando": "git reset",
"alert": "Did not use git reset",
"successMessages": [
"<span class=\"success\">Text files were removed from <strong>Stage</strong></span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "september_plans" : [ "development.txt" ] },
{ "october_plans" : [ "mockup.txt" ] },
"monthly_meetings.txt",
"my_plan.txt"
],
"commits": [
"20b5ccd - Added my_plan.txt"
]
}
},
"9": {
"orden": "9",
"titulo": "Adding files again",
"tituloCorto": "Git add #2",
"tareas": [
"As you see on the right panel, our files are not anymore on the <strong>Staging index</strong>.",
"Let's add them again."
],
"comando": "git add \"*.txt\"",
"alert": "Did not use git add",
"successMessages": [
"<span class=\"success\">Added files</span>"
],
"repoStatus": {
"branch": "master",
"repoFolder": [
{ ".git": [ ] },
{ "september_plans" : [ "development.txt" ] },
{ "october_plans" : [ "mockup.txt" ] },
"monthly_meetings.txt",
"my_plan.txt"
],
"staged": [
{ "september_plans" : [ "development.txt" ] },
{ "october_plans" : [ "mockup.txt" ] },
"monthly_meetings.txt"
],
"commits": [
"20b5ccd - Added my_plan.txt"
]
}
},
"10": {
"orden": "10",
"titulo": "Committing newly staged changes",
"tituloCorto": "Committing files #2",
"tareas": [
"Let's commit our newly staged changes.",
"How about adding a more descriptive commit message, such as <em>Added all text files</em>?"
],
"comando": "git commit -m \"Added all text files\"",
"alert": "Did not use git commit",
"successMessages": [
"[master (root-commit) 3852b4d]",
"'Added all text files'",
"3 file changed, 3 insertion(+)",
"create mode 100644 development.txt",
"create mode 100644 mockup.txt",
"create mode 100644 monthly_meetings.txt",
" "