-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathTutorial_180807_Git_review.html
992 lines (484 loc) · 42.7 KB
/
Tutorial_180807_Git_review.html
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
<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>깃과 깃헙 복습, 다른 사람의 레파지토리에 기여하기 · GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="Tutorial_180810_Apt_analysis_Statistics5.html" />
<link rel="prev" href="Tutorial_180806_XGBoost.md" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Introduction
</a>
</li>
<li class="chapter " data-level="1.2" data-path="Tutorial_180628_Git_and_Github.html">
<a href="Tutorial_180628_Git_and_Github.html">
Git과 Github, 기본 개념과 설명
</a>
</li>
<li class="chapter " data-level="1.3" data-path="Tutorial_180629_Git_with_constitution.html">
<a href="Tutorial_180629_Git_with_constitution.html">
헌법개정안으로 깃베쉬, 소스트리, 브랜치 이해하기
</a>
</li>
<li class="chapter " data-level="1.4" data-path="Tutorial_180629_Github_practice_Statistics1.html">
<a href="Tutorial_180629_Github_practice_Statistics1.html">
확률통계 기초와 깃허브 실습
</a>
</li>
<li class="chapter " data-level="1.5" data-path="Tutorial_180629_Statistics.html">
<a href="Tutorial_180629_Statistics.html">
통계 기본 개념과 설명
</a>
</li>
<li class="chapter " data-level="1.6" data-path="Tutorial_180702_Programming_Intro.html">
<a href="Tutorial_180702_Programming_Intro.html">
스크래치 실습을 통한 프로그래밍 맛보기
</a>
</li>
<li class="chapter " data-level="1.7" data-path="Tutorial_180702_tidydata.html">
<a href="Tutorial_180702_tidydata.html">
데이터다루기(tidydata)와 프로그래밍기초
</a>
</li>
<li class="chapter " data-level="1.8" data-path="Tutorial_180703_Python_introduction.html">
<a href="Tutorial_180703_Python_introduction.html">
파이썬 기초
</a>
</li>
<li class="chapter " data-level="1.9" data-path="Tutorial_180705_PythonReview_Lamda.html">
<a href="Tutorial_180705_PythonReview_Lamda.html">
범죄데이터로 파이썬 실습 (Lamda)
</a>
</li>
<li class="chapter " data-level="1.10" data-path="Tutorial_180705_Resume_01.html">
<a href="Tutorial_180705_Resume_01.html">
특강-자기소개서 워크숍(1)
</a>
</li>
<li class="chapter " data-level="1.11" data-path="Tutorial_180706_Civic_hacking_seminar.html">
<a href="Tutorial_180706_Civic_hacking_seminar.html">
특강-시빅해킹
</a>
</li>
<li class="chapter " data-level="1.12" data-path="Tutorial_180709_StaticBlogging_JekyllandRuby.html">
<a href="Tutorial_180709_StaticBlogging_JekyllandRuby.html">
지킬과 루비로 정적 블로그 만들기
</a>
</li>
<li class="chapter " data-level="1.13" data-path="Tutorial_180710_Lecture_Cooperation.html">
<a href="Tutorial_180710_Lecture_Cooperation.html">
특강-협업
</a>
</li>
<li class="chapter " data-level="1.14" data-path="Tutorial_180710_Lecture_Speciality.html">
<a href="Tutorial_180710_Lecture_Speciality.html">
특강-전문성
</a>
</li>
<li class="chapter " data-level="1.15" data-path="Tutorial_180712_DataVisualization101.html">
<a href="Tutorial_180712_DataVisualization101.html">
데이터 시각화 이해
</a>
</li>
<li class="chapter " data-level="1.16" data-path="Tutorial_180712_AttraciveResume2.html">
<a href="Tutorial_180712_AttraciveResume2.html">
특강-자기소개서 워크숍(2)
</a>
</li>
<li class="chapter " data-level="1.17" data-path="Tutorial_180713_Pandas101.html">
<a href="Tutorial_180713_Pandas101.html">
자료의 요약 과제를 통한 판다스 실습
</a>
</li>
<li class="chapter " data-level="1.18" data-path="Tutorial_180713_ExperimentDesignLecture.html">
<a href="Tutorial_180713_ExperimentDesignLecture.html">
특강-실험계획에 관해 알아보기
</a>
</li>
<li class="chapter " data-level="1.19" data-path="Tutorial_180716_Crawling_Shuffle.html">
<a href="Tutorial_180716_Crawling_Shuffle.html">
저작권과 직업윤리를 인지하고 크롤링 셔플 실습
</a>
</li>
<li class="chapter " data-level="1.20" data-path="Tutorial_180716_Markup_Html5lib.html">
<a href="Tutorial_180716_Markup_Html5lib.html">
Markup Html5lib, 파이썬으로 크롤링하기
</a>
</li>
<li class="chapter " data-level="1.21" data-path="Tutorial_180717_10minPandas.html">
<a href="Tutorial_180717_10minPandas.html">
Pandas 10분 완성
</a>
</li>
<li class="chapter " data-level="1.22" data-path="Tutorial_180717_PandasPetition.html">
<a href="Tutorial_180717_PandasPetition.html">
국민청원 첫시작 판다스로 국민청원하기
</a>
</li>
<li class="chapter " data-level="1.23" data-path="Tutorial_180719_BeautifulSoup.html">
<a href="Tutorial_180719_BeautifulSoup.html">
Beautiful Soup을 사용하여 크롤링
</a>
</li>
<li class="chapter " data-level="1.24" data-path="Tutorial_180719_plotnine.md">
<span>
국민청원 데이터 시각화와 자연어 처리-plontnine 실습하기
</a>
</li>
<li class="chapter " data-level="1.25" data-path="Tutorial_180720_coupang.html">
<a href="Tutorial_180720_coupang.html">
특강 - 비전공자가 데이터 분석가로 취업하기
</a>
</li>
<li class="chapter " data-level="1.26" data-path="Tutorial_180720_ProbabilityDistribution.html">
<a href="Tutorial_180720_ProbabilityDistribution.html">
통계학-자료의 요약, 확률분포(ProbabilityDistribution)
</a>
</li>
<li class="chapter " data-level="1.27" data-path="Tutorial_180723_Machine_learning.html">
<a href="Tutorial_180723_Machine_learning.html">
기계학습의 기초(지도학습/비지도학습/머신러닝)
</a>
</li>
<li class="chapter " data-level="1.28" data-path="Tutorial_180723_word_vectorsization.html">
<a href="Tutorial_180723_word_vectorsization.html">
텍스트 데이터 시각화 Word_vectorsization
</a>
</li>
<li class="chapter " data-level="1.29" data-path="Tutorial_180726_naver.html">
<a href="Tutorial_180726_naver.html">
특강 - AI R&D Director
</a>
</li>
<li class="chapter " data-level="1.30" data-path="Tutorial_180726_library.md">
<span>
전국도서관표준데이터 분석
</a>
</li>
<li class="chapter " data-level="1.31" data-path="Tutorial_180730_Categorizing_v2.html">
<a href="Tutorial_180730_Categorizing_v2.html">
국민청원 카테고리 분류하기
</a>
</li>
<li class="chapter " data-level="1.32" data-path="Tutorial_180730_Kaggle_NLP_v2.html">
<a href="Tutorial_180730_Kaggle_NLP_v2.html">
Kaggle NLP로 예측율 높이기
</a>
</li>
<li class="chapter " data-level="1.33" data-path="Tutorial_180730_Statistics.html">
<a href="Tutorial_180730_Statistics.html">
Hypothesis test
</a>
</li>
<li class="chapter " data-level="1.34" data-path="Tutorial_180731_MTPlanning.html">
<a href="Tutorial_180731_MTPlanning.html">
데잇걸즈 MT 계획으로 애자일 프로세스 실습해보기
</a>
</li>
<li class="chapter " data-level="1.35" data-path="Tutorial_180802_ZigZag.html">
<a href="Tutorial_180802_ZigZag.html">
특강 - 쇼핑몰 데이터 분석 이야기
</a>
</li>
<li class="chapter " data-level="1.36" data-path="Tutorial_180803_GettingJobGithub.html">
<a href="Tutorial_180803_GettingJobGithub.html">
깃허브로 취업하기
</a>
</li>
<li class="chapter " data-level="1.37" data-path="Tutorial_180803_Statistics4.html">
<a href="Tutorial_180803_Statistics4.html">
회귀분석(Linear regression)
</a>
</li>
<li class="chapter " data-level="1.38" data-path="Tutorial_180806_Folium_practice.md">
<span>
공공데이터 상권정보 분석해 보기
</a>
</li>
<li class="chapter " data-level="1.39" data-path="Tutorial_180806_Geolocatin_API_practice.md">
<span>
서울창업허브(공덕역) 맛집지도
</a>
</li>
<li class="chapter " data-level="1.40" data-path="Tutorial_180806_XGBoost.md">
<span>
XGBoost 분산형 그래디언트 부스팅 알고리즘
</a>
</li>
<li class="chapter active" data-level="1.41" data-path="Tutorial_180807_Git_review.html">
<a href="Tutorial_180807_Git_review.html">
깃과 깃헙 복습, 다른 사람의 레파지토리에 기여하기
</a>
</li>
<li class="chapter " data-level="1.42" data-path="Tutorial_180810_Apt_analysis_Statistics5.html">
<a href="Tutorial_180810_Apt_analysis_Statistics5.html">
아파트 분양가 분석 및 회귀분석2
</a>
</li>
<li class="chapter " data-level="1.43" data-path="Tutorial_180813_kaggle_Titanic.html">
<a href="Tutorial_180813_kaggle_Titanic.html">
스프레드시트로 캐글 타이타닉 참가하기
</a>
</li>
<li class="chapter " data-level="1.44" data-path="Tutorial_180814_Python_Class.html">
<a href="Tutorial_180814_Python_Class.html">
객체지향 프로그래밍
</a>
</li>
<li class="chapter " data-level="1.45" data-path="Tutorial_180814_Test_Driven_Development.html">
<a href="Tutorial_180814_Test_Driven_Development.html">
테스트 주도 개발
</a>
</li>
<li class="chapter " data-level="1.46" data-path="Tutorial_180817_Colors_in_Data_Visualization.md">
<span>
데이터 시각화와 색의 활용
</a>
</li>
<li class="chapter " data-level="1.47" data-path="Tutorial_180817_Statistics5.html">
<a href="Tutorial_180817_Statistics5.html">
통계-회귀분석3
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >깃과 깃헙 복습, 다른 사람의 레파지토리에 기여하기</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h3 id="오전수업">오전수업</h3>
<h4 id="git-과-github-이해하기">Git 과 Github 이해하기</h4>
<ul>
<li>Slack chatbot 프로젝트 만들기</li>
<li><code>MIT라이센스</code> : 자유롭게 이용 가능하나 그로 인해 발생하는 문제는 책임지지 않음. </li>
<li><code>GPL라이센스</code> : 무조건 gpl이 되어야 함.</li>
<li>라이센스가 명시되어있지 않다면, 원 저작권자에게 물어보아야 함.</li>
</ul>
<h4 id="깃헙으로-깃-이해하기-실습">깃헙으로 깃 이해하기 실습</h4>
<p>이번 수업에선 깃헙에 챗봇을 위한 레파지토리를 만들어 짝꿍과 함께 공동작업을 하는 방법을 익혀보았습니다. </p>
<ul>
<li><p>[실습] GitHub Repository와 Atom을 활용한 작업 @ Git Bash</p>
<pre><code> 작업 경로 확인 : $ pwd
폴더 변경 : $ cd 폴더명
폴더 내의 파일 확인 : $ ls -als
자신의 Repo를 Clone : $ git clone [email protected]:YoungestSalon/menubot.git
자신의 Repo를 Atom에 띄움 : $ atom .
수정 작업 (@ Atom : Ex. 문장 1개 추가 : print("Hello World!"))
작업 내역 확인 : $ git status
작업 내역 Add : $ git add main.py
작업 내역 Commit : $ git commit -m "Hello World"
작업 내역 Push : $ git push
</code></pre><ul>
<li><p>[실습] GitHub Repository와 Atom을 활용한 협업 작업 @ Git Bash</p>
<pre><code>상위 폴더로 이동 : $ cd ..
작업 경로 확인 : $ pwd
폴더 내의 파일 확인 : $ ls
동료의 Repo를 Clone : $ git clone https://github.com/YoungestSalon/Quotesbot
동료의 Repo를 Atom에 띄움 : $ atom .
수정 작업 (@ Atom)
변경 내역 확인 : $ git diff
작업 내역 확인 : $ git status
작업 내역 Add : $ git add --all
작업 내역 Commit : $ git commit -m "Add sentence"
작업 내역 Push : $ git push
Pull request 생성 (@ WEB : GitHub Repository)
참고) 현재 디렉토리의 작업 내역을 모두 삭제하는 경우 : $ git checkout --.
</code></pre></li>
<li><p>[실습] GitHub Repository Pull Request에서 Conflict가 발생한 경우 대처 방법 @ Git Bash</p>
<pre><code>[각자 작업]
자신의 Repo로 이동 : $ cd 폴더명
자신의 Local Clone을 최신화 : $ git pull
자신의 Local Clone에 대한 수정 작업 + 작업 내역 Add - Commit (* Push는 제외)
동료 Repo의 Local Clone으로 이동 : $ cd 폴더명
동료의 Local Clone에 대한 수정 작업 + 작업 내역 Add - Commit - Push
자신의 Local Clone 수정 작업에 대한 Push : Conflict가 발생
[Conflict가 발생한 Pull Request를 올린 사람(=Fork해서 작업한 사람)이 작업]
* 참조 : Conflict가 발생한 경우, PR을 날리는 쪽에서 해결해주는 것이 관례
동료의 Local Clone으로 이동 : $ cd 폴더명
동료의 원본 Repo(Fork한 Repo 아님!)를 upstream으로 설정 : $ git remote add upstream https://github.com/Yoonkimove/Quotesbot
동료의 원본 Repo에서 최신본을 다운로드 받아 임시폴더에 저장 : $ git fetch upstream
다운로드 받은 임시폴더의 최신본 + 기존의 작업 내역 : $ git merge upstream/master → 당연히 Conflict가 발생함
수정 작업 (@Atom) : '<<<<<<< HEAD', '=======', '>>>>>>> upstream/master'의 형태로 충돌이 발생한 부분을 알려줌 → 충돌 해소 : 양자택일 or 합치기
수정 작업 내역에 대한 Add - Commit - Push : 기존에 올린 PR의 Conflict가 해소됨
Merge :
</code></pre></li>
</ul>
</li>
</ul>
<h3 id="git-github-gitbash-이용하기">git, github, gitbash 이용하기</h3>
<h4 id="깃헙-레퍼지토리">깃헙 레퍼지토리</h4>
<ul>
<li>깃헙 이용 시, <code>create a new project</code>(우측 상단 초록색 버튼)을 누르게 되면 깃헙 서버에 새로운 내 레퍼지토리가 생성됩니다.</li>
<li>다른 사람의 레퍼지토리를 가져오고 싶은 경우, 해당 레퍼지토리에서 <code>fork</code>를 눌러 본인의 레퍼지토리로 포크해 올 수 있습니다.</li>
</ul>
<h4 id="로컬-pc로-클론-받아오기">로컬 PC로 클론 받아오기</h4>
<p>새로 생성하거나, fork해 온 레퍼지토리를 로컬 PC에서 작업하기 위하여 클론을 받아와야 합니다. </p>
<blockquote>
<p> fork란, 깃헙 자체에서 편의상 이용되는 개념으로, 깃헙 상에서 다른 사람들의 레퍼지토리를 나의 깃헙 공간으로 clone해 오는 것을 말합니다.</p>
</blockquote>
<ul>
<li><p>먼저, 깃헙에서 로컬로 클론받아 올 레퍼지토리를 눌러 SSH key 주소를 복사합니다. (SSH key 주소는 초록색 <code>Clone or Download</code>버튼을 눌러 확인할 수 있습니다.)</p>
</li>
<li><p>레퍼지토리 폴더를 생성할 로컬 경로로 가서 git bash를 실행시킵니다.</p>
</li>
<li><code>git clone 클론받아올 레퍼지토리의 주소</code> 를 입력하면 자동으로 깃으로 관리되는 로컬 폴더가 생성됩니다.</li>
</ul>
<p>git 을 클론해오변 원래의 저장소에는 origin이라는 이름을 붙여줍니다.</p>
<h4 id="로컬에서-편집한-파일을-git으로-관리하기">로컬에서 편집한 파일을 git으로 관리하기</h4>
<p>로컬 PC에서 여러가지 파일들을 수정 및 생성한 후 깃헙에 업로드합니다.</p>
<ul>
<li><p><code>git init</code>: 만약 폴더를 새롭게 생성한 경우, git으로 관리하기 위하여 적어줍니다.</p>
</li>
<li><p><code>git status</code> 여러가지 현재 로컬 파일의 정보들을 확인해 볼 수 있습니다. 새로 생성된 파일이 untracked 상태임을 알 수 있습니다.</p>
</li>
<li><code>git add 파일명</code>: untracked 상태였던 파일을 tracked 상태로 올립니다.</li>
</ul>
<p>실습 시간에 로컬 PC에서 새로 생성하여 작업했던 main.py 파일을 변경한 다음, 다음을 수행해 봅니다.</p>
<pre><code class="lang-bash">$ git status
On branch master
Your branch is up to date with <span class="hljs-string">'origin/master'</span>.
Changes to be committed:
(use <span class="hljs-string">"git reset HEAD <file>..."</span> to unstage)
new file: main.py
Changes not staged <span class="hljs-keyword">for</span> commit:
(use <span class="hljs-string">"git add <file>..."</span> to update what will be committed)
(use <span class="hljs-string">"git checkout -- <file>..."</span> to discard changes <span class="hljs-keyword">in</span> working directory)
modified: main.py
</code></pre>
<pre><code class="lang-bash">$ git commit -m <span class="hljs-string">"Hello world 작성"</span>
$ git status
On branch master Your branch is ahead of <span class="hljs-string">'origin/master'</span> by 1 commit. (use <span class="hljs-string">"git push"</span> to publish your <span class="hljs-built_in">local</span> commits)
nothing to commit, working tree clean
</code></pre>
<p>터미널을 이용하여 커밋을 해 주었기 때문에 <code>git status</code>를 확인해 보니 커밋할 것이 없는 상태입니다.</p>
<ul>
<li><code>git push</code>: origin의 master로 push되어 깃헙에 반영됩니다. (레퍼지토리 생성 시 따로 지정해주지 않으면 master브랜치가 기본 브랜치로 설정됩니다.)</li>
</ul>
<h5 id="git으로-파일-관리하기의-과정">git으로 파일 관리하기의 과정</h5>
<ol>
<li>파일을 생성하고 수정합니다. </li>
<li>해당 파일은 현재 untracked & unstaged 상태입니다.</li>
<li>add 해 주면 tracked & staged 상태로 변경됩니다.</li>
<li>또 다시 파일을 수정합니다.</li>
<li>해당 파일은 tracked 이지만, modified(unstaged) 상태로 변경됩니다.</li>
<li>add 해 주면 tracked & staged 상태로 변경됩니다.</li>
<li>파일을 commit 합니다.</li>
<li>해당 파일이 committed 상태로 변경되어 github의 기록에 남습니다.</li>
</ol>
<h4 id="다른-사람의-프로젝트에-기여하기">다른 사람의 프로젝트에 기여하기</h4>
<p>포크해 온 다른 사람의 레퍼지토리를 내 로컬PC로 클론 받아옵니다.</p>
<ul>
<li><p><code>git add upstream 다른 사람의 레퍼지토리 주소</code>: 다른 사람의 레퍼지토리를 upstream 으로 설정해줍니다.</p>
<p>('down'load와 'up'load처럼, 이 경우에는 'up'stream이 본래의(다른 사람의) 레퍼지토리가 됩니다.)</p>
</li>
<li><p>본인의 로컬 PC에서 수정한 파일을 origin(본인의 깃헙)으로 add, commit, push해 줍니다.</p>
</li>
<li><p>본인의 깃헙 계정의 해당 레퍼지토리로 이동하여 pull request를 생성합니다.</p>
</li>
<li><p>상대방이 해당 request를 읽어 본 후, 의견을 조율하여 merge를 해 준다면 완료!</p>
</li>
</ul>
<h4 id="여러가지-git-명령어들">여러가지 git 명령어들</h4>
<ul>
<li><code>pwd</code>: print working directory</li>
<li><code>ㅣㅣ</code>: 현재 디렉토리의 폴더 리스트가 보여집니다.</li>
<li><code>-v</code>: 'verbal'의 의미로, 더 자세하게 설명해줍니다.</li>
<li><code>[tab]</code>: 'tab'버튼은 전체 파일명을 입력하지 않아도 앞 몇 글자만으로도 파일명을 쉽게 입력할 수 있게 도와줍니다.</li>
<li><code>git diff</code>: 수정된 내용이 보여집니다.</li>
<li><code>git status</code>: 현 상태에서 자주 사용하는 git 명령어를 함께 출력해 줍니다.</li>
<li><code>git checkout -- main.py</code>: 파일을 수정하기 이전 버전으로 돌아갈 수 있습니다. (commit된 상태의 파일들은 대부분 기록이 남지만, add만 되어 있는 상태의 파일들의 기록은 남지 않습니다.)</li>
<li><code>git fetch upstream</code>: git ignore파일 어딘가에 upstream의 수정된 내용을 임시로 저장해 둡니다. (upstream의 실제 커밋을 내 로컬PC 어딘가에 저장해둡니다. working directory에 반영되지는 않습니다.)</li>
<li><code>git merge upstream/master</code>: 변경된 내용들을 merge해 줍니다. (현재 브랜치와 fetch에서 받아온 것들을 합쳐줍니다.)</li>
<li><code>--rebase</code>명령어는 위의 과정들을 깔끔히 해 주는 굉장히 강력한 도구이기 때문에 잘 사용해야 합니다.</li>
</ul>
<h4 id="아나콘다-프롬프트로-파이썬-실행하기">아나콘다 프롬프트로 파이썬 실행하기</h4>
<ul>
<li><code>cd 경로</code>: 실행할 파일이 있는 폴더로 이동해줍니다.</li>
<li><code>python 실행할파일명.py</code>로 파이썬 파일을 실행시켜 줍니다.<ul>
<li><code>ctrl+c</code>를 눌러 실행을 종료합니다.</li>
</ul>
</li>
<li><code>python</code>: 현재 파이썬 버전을 확인합니다.<ul>
<li><code>quit()</code>으로 중단합니다.</li>
</ul>
</li>
</ul>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="Tutorial_180806_XGBoost.md" class="navigation navigation-prev " aria-label="Previous page: XGBoost 분산형 그래디언트 부스팅 알고리즘">
<i class="fa fa-angle-left"></i>
</a>
<a href="Tutorial_180810_Apt_analysis_Statistics5.html" class="navigation navigation-next " aria-label="Next page: 아파트 분양가 분석 및 회귀분석2">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"깃과 깃헙 복습, 다른 사람의 레파지토리에 기여하기","level":"1.41","depth":1,"next":{"title":"아파트 분양가 분석 및 회귀분석2","level":"1.42","depth":1,"path":"Tutorial_180810_Apt_analysis_Statistics5.md","ref":"Tutorial_180810_Apt_analysis_Statistics5.md","articles":[]},"previous":{"title":"XGBoost 분산형 그래디언트 부스팅 알고리즘","level":"1.40","depth":1,"path":"Tutorial_180806_XGBoost.md","ref":"Tutorial_180806_XGBoost.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{"BASE_URL":"https://dataitgirls2.github.io"},"plugins":["ga","-sharing"],"pluginsConfig":{"ga":{"configuration":"auto","token":"UA-43356518-7"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"Tutorial_180807_Git_review.md","mtime":"2018-09-07T13:38:18.038Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-09-09T04:41:47.437Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-ga/plugin.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>