Upload
jongil-seok
View
343
Download
19
Embed Size (px)
Citation preview
@daclouds_
석종일 Programmer
“우리����������� ������������������ 친하게����������� ������������������ 지내요~����������� ������������������ >_<“
Stop emailing code
https://education.github.com/assets/illustration-share-code-f8d1d0ad9fceca0fc5156dea4ab0eb14.png
어느 쪽이 알아보기 쉬운가요?
• 2014-12-20 13:30
• 2014-12-20 11:59
• 2014-12-19 19:24
• 2014-12-17 14:33
• 2014-12-11 23:15
• …
• Commit, Issue 용어 설명
• VCS 종류별 장단점
• git 기본 명령어와 중복된 내용 제거
• 저작권 관련 표기
• vim 배우기
• …
Stay organized
https://education.github.com/assets/illustration-one-place-ea4a5f0e6cb2e72e9630fa1cc50119dd.png
중앙집중형 버전관리시스템
https://mikiorbe.files.wordpress.com/2008/10/cvsbig.gif, https://subversion.apache.org/
http://mercurial.selenic.com/http://git-scm.com/
https://github.com/
https://octodex.github.com/original/
https://bitbucket.org/
Git 의 목표
• 빠른 속도
• 단순한 구조
• 비선형적 개발 (수천 개의 동시 다발적인 브랜치)
• 완벽한 분산
• 리눅스 커널 같은 대형 프로젝트에서도 속도나 데이터 크기 면에서 유용 할 것
Git 의 무결성
• Git 은 SHA-1 Hash 를 사용하여 체크섬을 만듭니다.
• 만든 체크섬은 40자 길이의 16진수 문자열입니다.
• SHA-1 은 아래처럼 생겼어요.
• 24b9da6552252987aa493b52f8696cd6d3b0
Linux 명령어 배우기• > mkdir numbers
• numbers 라는 이름의 디렉토리를 만들 때
• > mkdir -p numbers/txt
• numbers 디렉토리가 없는 상황에서 numbers 와 numbers 밑에 txt 디렉토리를 한꺼번에 만들 때
충돌 발생!• $ git merge luckyAuto-merging numbers.txtCONFLICT (content): Merge conflict in numbers.txtAutomatic merge failed; fix conflicts and then commit the result.
• # 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 7pick 6b2481b replace 둘 to 2pick fa39187 1 to 10
• pick d3672b0 replace 일곱 to 7squash 6b2481b replace 둘 to 2pick fa39187 1 to 10
Commit 합치기/순서 바꾸기
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/
기억을 하기 위해선…• 기록을 해야합니다. 무엇이 필요할까요?
• 작성된 시간
• 작성자
• 혼자서 작성할 때는 필요없지만 여럿이 작성한다면 필요합니다.
• 제목
• 내용이 길 경우엔 내용을 함축할 수 있는 짤막한 요약이 도움이 됩니다.
• 내용
Commit Guidelines• 영문 50글자 이하의 간략한 수정 요약
• 자세한 설명. 영문 72글자 이상이 되면 줄 바꿈을 하고 이어지는 내용을
• 작성한다. 특정 상황에서는 첫 번째 줄이 이메일 메시지의 제목이 되고
• 나머지는 메일 내용이 된다. 간략하게 요약하고 넣는 빈 줄은 자세한
• 설명을 아예 쓰지 않는 한 매우 중요하다.
• 이어지는 내용도 한 줄 띄우고 쓴다.
• - 목록 표시도 사용할 수 있다.
• - 보통 '-' 나 '*' 표시를 사용해서 목록을 표현하고 표시 앞에 공백
• 하나, 각 목록 사이에는 빈 줄을 하나를 넣는데 상황에 따라 다르다.
지금부터..
몇 가지 git 명령어를 몇 가지 도구들을 사용하여 실습하는 것을 보여 줄 꺼에요
물론 이후에 이어지는 실습도 같은 방식으로 할 수 있습니다.
하지만 이후 실습은 CLI 로만 보여 줄 꺼에요;
아닙니다!
http://www.eclipse.org/egit/ https://visualstudiogallery.msdn.microsoft.com/
abafc7d6-dcaa-40f4-8a5e-d6724bdb980c
https://progit.org/
https://images-na.ssl-images-amazon.com/images/I/51yUrziP2fL._SL250_.jpghttp://www.insightbook.co.kr/wp-content/uploads/2013/04/표지-235x300.jpg
git 설정• 맥에서는 터미널, 윈도우에서는 Git Bash 창에서
• $ git config --global user.name "John Doe"
• $ git config --global user.email [email protected]
log alias• $ git config --global alias.lg "log --all --oneline --decorate --graph"
• 다음 명령으로 확인
• $ git config --global --list
ssh 설정• http://git-scm.com/book/ko/v1/Git-서버-공개키-만들기
• $ ssh-keygenGenerating 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 [email protected]
public key 확인• $ cat ~/.ssh/id_rsa.pub
• ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSUGPl…NrRFi9wrf+M7Q== [email protected]
Build a portfolio
https://education.github.com/assets/illustration-contribute-6f244f162a35a823a61731656b901fe6.png
꾸준히 코딩하고 자신의 작업을 뽑내세요~
• KGUG(https://www.facebook.com/groups/kgugs/)의 Git 교육을 위해 만든 이 교육자료는크리에이티브 커먼즈 [저작자표시-비영리-동일조건변경허락 4.0]에 따라 이용할 수 있습니다.
• 자세한 내용은 http://creativecommons.org/licenses/by-nc-sa/4.0/deed.ko 를 참고하세요.
• twitter: @daclouds_email: [email protected]