47. Linux 명령어 배우기
• mkdir numbers
• numbers 라는 이름의 디렉토리를 만들 때
• mkdir -p numbers/txt
• numbers 디렉토리가 없는 상황에서
numbers 와 numbers 밑에 txt 디렉토리를 한꺼번에 만들 때
52. hunk
• - 변경 단위
• 앞의 상황은 서로 다른 hunk 가 변경되었기 때문에 아무런 문제
가 발생하지 않습니다.
53. 동일한 위치에서 수정
•@@ -4,7 +4,7 @@
• 넷
• 다섯
• 여섯
•-일곱
•+lucky
•@@ -4,7 +4,7 @@
• 넷
• 다섯
• 여섯
•-일곱
•+7
54. 충돌 발생!
• $ git merge lucky
Auto-merging numbers.txt
CONFLICT (content): Merge conflict in numbers.txt
Automatic merge failed; fix conflicts and then commit
the result.
56. vim 배우기
• 편집 모드
• i (입력), a (추가)
• 입력 모드를 빠져나올 때
• ESC
57. vim 배우기
• 명령어 모드
• :
• 빠져 나오기
• ESC
• 저장하기
• :w
• vim 종료
• :q
• 저장하고 나오기
• :wq
• 저장하지 않고 나오기
• :q!
58. • # Rebase bdd3996..7b36971 onto bdd3996
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, mixup = like “squash”, but discard this commit’s log message
# x, exec = run commond (the rest of the line) using shell
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
• pick d3672b0 replace 일곱 to 7
pick 6b2481b replace 둘 to 2
pick fa39187 1 to 10
• pick d3672b0 replace 일곱 to 7
squash 6b2481b replace 둘 to 2
pick fa39187 1 to 10
Commit 합치기/순서 바꾸기
59. Commit Messages 수정
• # This is a combination of two commits.
# The first commit's message is:
replace 둘 to 2
# This is the 2nd commit message:
replace 일곱 to 7
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Not currently on any branch.
# Changes to be committed:
# (use git reset HEAD file... to unstage)
#
# modified: numbers.txt
#
https://help.github.com/articles/using-git-rebase/
60. 왜 그래야 하는데!?
• 왜냐하면 우리의 목적은..
• 파일의 변화를
• 의미있는 단위로 묶어서
• 그들의 선후 관계를
• 기록하는 것 X
61. 기억을 하기 위해선…
• 기록을 해야합니다. 무엇이 필요할까요?
• 작성된 시간
• 작성자
• 혼자서 작성할 때는 필요없지만 여럿이 작성한다면 필요합니다.
• 제목
• 내용이 길 경우엔 내용을 함축할 수 있는 짤막한 요약이 도움이 됩니
다.
• 내용
62. Commit Guidelines
• 영문 50글자 이하의 간략한 수정 요약
• 자세한 설명. 영문 72글자 이상이 되면 줄 바꿈을 하고 이어지는 내용을
• 작성한다. 특정 상황에서는 첫 번째 줄이 이메일 메시지의 제목이 되고
• 나머지는 메일 내용이 된다. 간략하게 요약하고 넣는 빈 줄은 자세한
• 설명을 아예 쓰지 않는 한 매우 중요하다.
• 이어지는 내용도 한 줄 띄우고 쓴다.
• - 목록 표시도 사용할 수 있다.
• - 보통 '-' 나 '*' 표시를 사용해서 목록을 표현하고 표시 앞에 공백
• 하나, 각 목록 사이에는 빈 줄을 하나를 넣는데 상황에 따라 다르다.
84. git 설정
• 맥에서는 터미널, 윈도우에서는 Git Bash 창에서
• $ git config --global user.name John Doe
• $ git config --global user.email johndoe@example.com
85. log alias
• $ git config --global alias.lg log --all --oneline --
decorate --graph
• 다음 명령으로 확인
• $ git config --global --list
86. ssh 설정
• http://git-scm.com/book/ko/v1/Git-서버-공개키-만들기
• $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/schacon/.ssh/
id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/schacon/.ssh/
id_rsa.
Your public key has been saved in /Users/schacon/.ssh/
id_rsa.pub.
The key fingerprint is:
43:c5:5b:5f:b1:f1:50:43:ad:20:a6:92:6a:1f:9a:3a
schacon@agadorlaptop.local
87. public key 확인
• $ cat ~/.ssh/id_rsa.pub
• ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfH
Y17SbrmTIpNLTGK9Tjom/BWDSUGPl…
NrRFi9wrf+M7Q== schacon@agadorlaptop.local
90. • KGUG(https://www.facebook.com/groups/kgugs/)의
Git 교육을 위해 만든 이 교육자료는
크리에이티브 커먼즈 [저작자표시-비영리-동일조건변경허락
4.0]에 따라 이용할 수 있습니다.
• 자세한 내용은 http://creativecommons.org/licenses/by-
nc-sa/4.0/deed.ko 를 참고하세요.
• twitter: @daclouds_
email: daclouds@gmail.com