"Git"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
잔글 |
잔글 |
||
42번째 줄: | 42번째 줄: | ||
== Git 명령어 == | == Git 명령어 == | ||
− | + | *저장소 : Work Space -> Staging Area (index) -> Local Storage -> Remote Storage | |
+ | *버전 : Master, Branch | ||
{| border="1" cellspacing="0" cellpadding="2" style="width: 100%;" | {| border="1" cellspacing="0" cellpadding="2" style="width: 100%;" | ||
50번째 줄: | 51번째 줄: | ||
| style="text-align: center; background-color: rgb(241, 241, 241);" | 상세 | | style="text-align: center; background-color: rgb(241, 241, 241);" | 상세 | ||
|- | |- | ||
− | | style="text-align: center;" | 초기 설정 | + | | style="text-align: center;" rowspan="3" | 초기 설정 |
| git init | | git init | ||
| 로컬 저장소 생성 | | 로컬 저장소 생성 | ||
|- | |- | ||
− | | style="text-align: center;" | <br/> | + | | git remote add <repository> |
− | | git | + | | 리모트 저장소 연결<br/>Repository : user@password:/~/~<br/> |
− | | | + | |- |
+ | | git clone <repository> | ||
+ | | 로컬 저장소로 리모트 저장소 복제 | ||
+ | |- | ||
+ | | style="text-align: center;" rowspan="4" | 저장하기 | ||
+ | | git add | ||
+ | | Staging Area로 추가 | ||
+ | |- | ||
+ | | git commit | ||
+ | | 로컬 저장소로 commit | ||
+ | |- | ||
+ | | git commit -a | ||
+ | | git add + git commit | ||
+ | |- | ||
+ | | git push | ||
+ | | 리모트 저장소로 commit | ||
+ | |- | ||
+ | | style="text-align: center;" rowspan="3" | 가져오기 | ||
+ | | git fetch | ||
+ | | <br/> | ||
+ | |- | ||
+ | | git merge | ||
+ | | <br/> | ||
+ | |- | ||
+ | | git pull | ||
+ | | git fetch + get merge | ||
+ | |- | ||
+ | | style="text-align: center;" rowspan="3" | 버전 관리 | ||
+ | | git branch ~ | ||
+ | | <br/> | ||
+ | |- | ||
+ | | git checkout ~ | ||
+ | | <br/> | ||
+ | |- | ||
+ | | <br/> | ||
+ | | <br/> | ||
|- | |- | ||
| style="text-align: center;" | <br/> | | style="text-align: center;" | <br/> |
2014년 9월 29일 (월) 14:03 판
오픈소스 분산 버전 컨트롤 시스템인 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)
- 원격 저장소 : 다른 사람과 작업을 공유할 때 사용 (git push / git pull (git fetch, git merge))
- 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)
CentOS에서 git 설치
- 설치
yum install git git version
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 commit | 로컬 저장소로 commit | |
git commit -a | git add + git commit | |
git push | 리모트 저장소로 commit | |
가져오기 | git fetch | |
git merge | ||
git pull | git fetch + get merge | |
버전 관리 | git branch ~ | |
git checkout ~ | ||
참고 문헌
- GitHub
- CVS
- Subversion
- "민짱의 작업실"의 GIT 사용법 (ProGIT)
- http://git-scm.com/downloads : 설치프로그램 다운로드