GIT 사용방법

GIT 사용방법 

# git clone git@URL주소:저장소.git

GIT 업데이트

# git pull

GIT 적용

# git add 파일명

# git commit

# git push

GIT 소스 추출

# git checkout-index -a -f –prefix=../export/

GIT 특정 리비젼 받기

# git checkout 해쉬코드

GIT 마스터 소스로 이동

# git checkout master

GIT 수정한 코드 되돌리기

# git checkout <파일명>

GIT 브랜치 이름과 파일명이 동일한 경우가 있을 때는

# git checkout — <파일명>

GIT 롤백

# git reset –hard

GIT 환경설정

# git config –global user.name “아이디”

# git config –global user.email 이메일

# git config –global color.ui “auto”

# git config –global merge.tool kdiff3

# git config –global merge.tool bcompare

# git config –list

RSA 키 생성

# ssh-keygen -t rsa -C “이메일”

– 생성된 공개키 ~/.ssh/id_rsa.pub 생성됨

– 개인용 비밀키 ~/.ssh/id_rsa 분실 주의 (분실시 재등록 요청해야 함).

GIT 설치

# sudo apt-get install git-core git-doc git-gui gitg ssh kdiff3