Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf ·...

55
Eclipse GIT Plug-In 설치

Transcript of Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf ·...

Page 1: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT

Plug-In 설치

Page 2: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT Plug-In 설치

Help –> Install New

Software 클릭

Page 3: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT Plug-In 설치

http://www.jgit.org/updates

입력 후 “OK”

Page 4: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT Plug-In 설치

Eclipse Git Team provider 체크 후 “Next”

Page 5: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT Plug-In 설치

“Next”

Page 6: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT Plug-In 설치

Accept 후“Finish”

Page 7: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Eclipse GIT Plug-In 설치

설치 후Eclipse 재시작

Page 8: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Flow 의 이해

Page 9: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

A

local A branch

4. commit

5. push

팀장 local

Master branch

develop branch

commit

push

push 1. Import

2. A branch 생성& checkout

3. 수정

6. Develop branch checkout

8. merge

9. push

7. pull

Flow 의 이해

11.동기화

10 . A branch checkout

Page 10: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Github 와 Egit 연동 (팀장 & 최초 소스공유자)

Page 11: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Github 와 Egit 연동 (팀장 & 최초 소스공유자)

Project 생성 후

Team -> Share Project

Page 12: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

1. Git 클릭“Next” 2. Create 클릭

3.로컬 경로 지정 과 이름 입력 후

“Finish”

Github 와 Egit 연동 (팀장 & 최초 소스공유자)

Page 13: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

로컬 저장소 생성

Github 와 Egit 연동 (팀장 & 최초 소스공유자)

Page 14: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Commit (팀장 & 최초 소스공유자)

Page 15: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Commit(팀장 & 최초 소스공유자)

Commit 하기 위한 project 우 클릭

Team -> commit

Commit 이란? 로컬 저장소에 project 저장

Page 16: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Commit 과 관련된 정보를 남

Commit(팀장 & 최초 소스공유자)

Page 17: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Push (팀장 & 최초 소스공유자)

Page 18: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Push (팀장 & 최초 소스공유자)

push 하기 위한 project 우 클릭

Team -> Remote

-> Push

push 란? 로컬에 commit

한 Project를 원격

저장소로

Page 19: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

http 설정

Github의 그룹 저장소 주소

입력

Push (팀장 & 최초 소스공유자)

Page 20: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

“Next”

Master 선택 후 ADD

Force Update 체크 시 기존 저장되어있던 프로젝트가 삭제 되기 때문에 체크 해

Push (팀장 & 최초 소스공유자)

Page 21: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

develop Branch 생성 (팀장 & 최초 소스공유자)

Page 22: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

develop branch 생성

Team -> Switch To -> New Branch

develop Branch 생성 (팀장 & 최초 소스공유자)

Page 23: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Devleop 설정 후 Finish

-> github 로그인

develop Branch 생성 (팀장 & 최초 소스공유자)

Page 24: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

develop Branch 생성 (팀장 & 최초 소스공유자)

Page 25: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Devleop 설정 후 ADD

develop Branch 생성 (팀장 & 최초 소스공유자)

Page 26: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Branch가 추가됨 클릭!

develop Branch 생성 (팀장 & 최초 소스공유자)

Page 27: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Github 와 Egit 연동 (팀원)

Page 28: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Github 와 Egit 연동 (팀원)

Page 29: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

그룹저장소 주소 입력

Github 와 Egit 연동 (팀원)

Page 30: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

로컬저장소로 지정 develop Branch 선택

Branch 목록 develop branch 선택

Github 와 Egit 연동 (팀원)

Page 31: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Github 와 Egit 연동 (팀원)

Page 32: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Github 와 Egit 연동 (팀원)

develop branch로 checkout 상태!

수정을 위해서 나만의 branch를 생성

Page 33: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

나만의 brach 생성 (팀원)

Page 34: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

나만의 branch 생성

Team -> Switch To -> New Branch

나만의 brach 생성 (팀원)

Page 35: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

나만의 brach 생성 (팀원)

Page 36: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

수정 후 commit & push

*push 시 자신의 branch 선택

나만의 brach 생성 (팀원)

Page 37: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

원격 저장소에 자신의 branch 가 생성

나만의 brach 생성 (팀원)

Page 38: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

develop branch 와

나의 branch 병합 (팀원)

Page 39: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Member1은 수정 후 개발 branch로

checkout

develop branch 와 병합 (팀원)

Page 40: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Member1이 수정 하는 동안 개발 branch가 업데이트 될 수 도 있기 때문에

꼭! Pull 작업을 하여야됨

develop branch 와 병합 (팀원)

Page 41: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

member1이 수정한

java 소스

현재 개발 branch와 Member1이 수정한 소스의 차이가 발생

devlop branch의 현재 java 소스

•Develop branch로

Checkout 상태!

develop branch 와 병합 (팀원)

Page 42: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

차이가 발생하는 소스에 대한 병합 처리

develop branch 와 병합 (팀원)

Page 43: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

자신의 brach를 선택해서 병합

•현재는 Develop branch에

Checkout한 상태

develop branch 와 병합 (팀원)

Page 44: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

병합 후 소스의 상태

오류 부분을 지운 후 에도 에러가 생김

develop branch 와 병합 (팀원)

Page 45: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

오류 해결을 위해 Add to Index

develop branch 와 병합 (팀원)

Page 46: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

오류 해결 후 Commit & push

develop branch 와 병합 (팀원)

Page 47: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

develop branch 와 병합 (팀원)

Github의 develop branch

병합한 파일 내용

Page 48: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

원격 저장소의 Branch 와 동기화

Page 49: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

동기화의 이유?

나의 branch에서 작업 전, 원격 저장소의 다른 branch

의 최신 파일 내용을 수정 작업 해야할 경우

Page 50: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

현재 develop branch의 내용

자신의 branch로 checkout 시 Develop branch와 다른 내용

Why? 자신이 수정한 내용까지만

commit&push되었기 때문에 병합 후의 내용은 없게 된다.

원격 저장소의 Branch 와 동기화

Page 51: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Team -> advanced -> synchronize ->

동기화 할 branch

원격 저장소의 Branch 와 동기화

Page 52: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

현재 develop branch

자신의 branch

원격 저장소의 Branch 와 동기화

클릭!!

Page 53: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

원격 저장소의 Branch 와 동기화

자신의 Branch에서

개발

Page 54: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

Q & A

Page 55: Eclipse GIT - contents.kocw.or.krcontents.kocw.or.kr › document › 01-03-GitHub(Eclipse).pdf · 2014-05-12 · Eclipse GIT Plug-In 설치 Eclipse Git Team provider 체크 후 “Next”

감사합니다.