"Git"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
잔글 |
잔글 |
||
2번째 줄: | 2번째 줄: | ||
*홈페이지 : [http://git-scm.com/ http://git-scm.com/] | *홈페이지 : [http://git-scm.com/ http://git-scm.com/] | ||
+ | **매뉴얼 : http://git-scm.com/book/ko/%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0 | ||
*다운로드 : [http://git-scm.com/download http://git-scm.com/download] | *다운로드 : [http://git-scm.com/download http://git-scm.com/download] | ||
*라이선스 : | *라이선스 : | ||
19번째 줄: | 20번째 줄: | ||
*Staging Area (index) : Commit할 파일을 지정 (git add) | *Staging Area (index) : Commit할 파일을 지정 (git add) | ||
*로컬 저장소 : 자신이 작업한 내용을 반영 (git commit, git commit -a) | *로컬 저장소 : 자신이 작업한 내용을 반영 (git commit, git commit -a) | ||
− | **nonbare-repository : 프로젝트 리소스 저장 | + | **nonbare-repository : 프로젝트 리소스 저장 |
*원격 저장소 : 다른 사람과 작업을 공유할 때 사용 (git push / git pull (git fetch, git merge)) | *원격 저장소 : 다른 사람과 작업을 공유할 때 사용 (git push / git pull (git fetch, git merge)) | ||
− | **bare-repository : 이력, 변경 사항 저장 | + | **bare-repository : 이력, 변경 사항 저장 |
*Work Space -> Staging Area (index) -> Local Storage -> Remote Storage | *Work Space -> Staging Area (index) -> Local Storage -> Remote Storage | ||
56번째 줄: | 57번째 줄: | ||
=== Windows에서 git 설치 === | === Windows에서 git 설치 === | ||
− | |||
− | |||
<span style="color:#008000;"><span style="font-size:larger;">'''Git 설치'''</span></span> | <span style="color:#008000;"><span style="font-size:larger;">'''Git 설치'''</span></span> | ||
191번째 줄: | 190번째 줄: | ||
*[http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] | *[http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] | ||
− | *http://unikys.tistory.com/323 | + | *[http://unikys.tistory.com/323 http://unikys.tistory.com/323]<br/> |
[[Category:오픈소스|Category:오픈소스]]<br/>[[Category:Repository|Category:Repository]]<br/>[[Category:DevOps|Category:DevOps]] | [[Category:오픈소스|Category:오픈소스]]<br/>[[Category:Repository|Category:Repository]]<br/>[[Category:DevOps|Category:DevOps]] |
2014년 9월 29일 (월) 15:25 판
오픈소스 분산 버전 컨트롤 시스템인 git를 정리 한다.
- 홈페이지 : http://git-scm.com/
- 다운로드 : http://git-scm.com/download
- 라이선스 :
- 플랫폼 :
Git 개요
Git은 로컬 저장소를 가지며 SnapShot 형태로 버전을 관리 합니다.
Git 저장소
- Work Space : 개인별 작업 공간
- Staging Area (index) : Commit할 파일을 지정 (git add)
- 로컬 저장소 : 자신이 작업한 내용을 반영 (git commit, git commit -a)
- nonbare-repository : 프로젝트 리소스 저장
- 원격 저장소 : 다른 사람과 작업을 공유할 때 사용 (git push / git pull (git fetch, git merge))
- bare-repository : 이력, 변경 사항 저장
- Work Space -> Staging Area (index) -> Local Storage -> Remote Storage
Master and Branch
- Master : 메인 코드 (git checkout master, git merge branch)
- Branch : 새로 작업을 위해 생성한 코드 (git branch, git checkout, git checkbout -b)
Git 설치
CentOS에서 git 설치
Git 설치
yum install git git version |
Git 리모트 저장소 생성
groupadd git su - git |
Windows에서 git 설치
Git 설치
Git 다운로드 사이트에서 Windows용 Git 설치 파일(Git-1.9.4-preview20140815.exe)을 다운로드하여 설치 합니다.
P:/001_work/gitRepositor/ 폴더를 만들고 해당 폴더에서 오른쪽 마우스를 클릭 합니다.
Git 로컬 저장소 생성
git clone |
참고 문헌
- http://forum.falinux.com/zbxe/index.php?document_srl=588283&mid=lecture_tip
- http://insanehong.kr/post/guide-to-git-for-windows/
Git 명령어
- 저장소 : Work Space -> Staging Area (index) -> Local Storage -> Remote Storage
- 버전 : Master, Branch
분류 | 명령어 | 상세 |
초기 설정 | git init | 로컬 저장소 생성 |
git remote add <repository> | 리모트 저장소 연결 Repository : user@password:/~/~ | |
git clone <repository> | 로컬 저장소로 리모트 저장소 복제 | |
저장하기 | git add | Staging Area로 추가 |
git reset HEAD | Staging Area에 추가할 파일을 삭제 | |
git commit | 로컬 저장소로 commit | |
git commit -a | git add + git commit | |
git fetch origin git reset --hard origin/master |
로컬 저장소로 commit한 것을 복구 | |
git push | 리모트 저장소로 commit | |
가져오기 | git fetch | 로컬 저장소로 가져오기 |
git merge | 로컬 저장소의 소스와 병합 | |
git pull | git fetch + get merge | |
버전 관리 | git branch ~ | 브랜치 생성 |
git checkout ~ | ||
git checkout -b ~ | git branch + git checkout | |
git branch -d ~ | 브랜치 삭제 | |
git checkout master | ||
git merge branch | 브랜치 병합 | |
git branch git branch --no-merged git branch --merged |
브랜치 목록 | |
태그 관리 | git tag ~ git tag -a ~ |
태그 생성 |
git tag -d ~ | 태그 삭제 | |
git tag | 태그 목록 |
참고 문헌
- GitHub
- CVS
- Subversion
- "민짱의 작업실"의 GIT 사용법 (ProGIT)
- http://git-scm.com/downloads : 설치프로그램 다운로드