Upload
kenu-heo
View
1.043
Download
3
Embed Size (px)
DESCRIPTION
github story
Citation preview
재밌는 GitHub 이야기허광남
토픽
• GitHub?
• 기본 사용법
• 이런 경우 어떻게?
GitHub?
• Git + Hub = GitHub
• 엔진 + 서비스
소스 관리
• Git 이전에 CVS, SVN
• 그 이전에 압축_날짜.zip
버전 관리
• 프로젝트가 있다고 하고,
• 소스 파일 탄생하면
• 주민 등록: add
• 공유할 버전 확정: commit
• 버전 번호 증가
공동 작업
• 개발자A, 개발자B
• 같은 소스 파일을 가져와서
• 변경 후
• 먼저 서버에 올린 사람이 장땡
공동 작업 #2
• 나중에 올리는 사람이 할 일
• 최종 변경 사항을 로컬로 가져오기
• 로컬과 합치고,
• 같이 변경된 부분의 충돌 정리
• 다시 수정 버전 추가, 커밋하고,
• 서버에 올려서 공유
버전 관리 시스템
Image from: http://designpatternschash.blogspot.com/2008/09/what-is-tortoise-svn.html
분산 버전 관리 시스템Repository
Repository Repository Repository
pull push
분산 버전 관리 시스템Repository
Repository Repository Repository
pull push
Local Commit
Local Commit
Local Commit
저장소 해쉬코드
• 버전 구분
• 3269aecad9ffea81763a42b9fff34c76a0aa4cf0
• 3269aec
기본 사용법
Git Client
• http://git-scm.com download
• git bash 추천
• Git GUI에서 꼬이면 ㅠㅠ
• 콘솔에서 작업, 명쾌
로컬 개발자
•~/.gitconfig 파일•git config --global user.email [email protected]
•git config --global user.name “kenu”
~/git
• 로컬 저장소 홈
• mkdir ~/git/okprj
• cd ~/git/okprj
• git init
기본 사용법 방법#1
• GitHub에 프로젝트 만들고
• git clone https://github.com/id/project.git
기본 사용법 방법#2
• 로컬에 프로젝트 만들고,
• git remote add origin https://github.com/id/project.git
• git pull origin master
• git push origin master
로컬
•git init•echo ‘Hello Git’ > README.md•git add README.md•git commit -m “init”
remote
• github에 [new Repository]
• git remote
• git remote -v
• git remote add origin https://github.com/id/project.git
remote
• git status
• git pull origin master
• git push origin master
이런 경우 어떻게?
• 충돌이 난 경우
• 비밀 번호가 공유된 경우
• 브랜치 따고 싶어요
충돌이 난 경우
비밀번호가 공유된 경우
• 3커밋 이전으로
• git push -f origin HEAD^^^:master
비밀번호가 공유된 경우
• 3커밋 이전으로
• git push -f origin HEAD^^^:master
브랜치 따고 싶어요• git reset --hard 문제가발생한버전해쉬
• git reset --hard 3269aec
• git status
• git log
• git checkout -b hatelist
• git push origin hatelist
저장소 복사
• fork
• Pull Request
• https://github.com/jquery/jquery
• https://github.com/kenu/jquery
svn 2 git
• git svn clone https://src.springframework.org/svn/spring-samples/jpetstore/trunk
http://nvie.com/posts/a-successful-git-branching-model/
가지치기
http://nvie.com/posts/a-successful-git-branching-model/
http://dogfeet.github.io/articles/2012/progit.html
Pro Git ebookGitHub CTO의 책을 잘 번역한 오픈 북
http://www.insightbook.co.kr/post/5633<프로 Git>, 이미 공개된 내용을 왜 책으로 만들었냐고요?
http://learnbranch.urigit.com/
Git 브랜치 배우기brunch 아니죠, 브랜치 맛있게 배우기
http://www.okjsp.net/bbs?keyfield=subject&keyword=git&act=LIST&bbs=TOOL
http://www.okjsp.net/bbs?keyfield=subject&keyword=Git&act=LIST&bbs=TOOL
Git 정보저도 배우고 있습니다. 공유합니다. ^^;
http://git-scm.com/book/en/Distributed-Git-Distributed-Workflows
Git 관리 체계독재자 방식, 맘에 듭니다만,
중간단계는 로컬 Git서버 설치 필요합니다.
http://rogerdudler.github.io/git-guide/index.ko.html
git - 간편 안내서git을 시작하기 위한 간편 안내서. 어렵지 않아요 ;)
http://dogfeet.github.io/articles/2012/git-github-secrets.html
GitHub secrets
프로젝트 지원
• 프로젝트별 1G 저장소
• 설정 / 위키 / 이슈 / 그래프
• 설정 > 공동작업자
너무 많아요 ㅠㅠhttps://github.com/blog/1499-the-revolution-will-be-forked