Git - 리눅스 환경에서의 소스 관리 프로그램

Git 설치


Redhat 계열

$ yum install git

Debian 계열

$ apt-get install git


Git 초기 설정


이름 설정

$ git config --global user.name "name"

이메일 설정

$ git config --global user.email "email@email.com"


Git 기본 사용


새로운 프로젝트 폴더 생성 뒤 초기화

$ mkdir PROJECT
$ cd PROJECT
$ git init

Local Repository에 적용할 새로운 파일이나 수정된 파일을 추가

$ git add FILENAME

Local Repository에 적용

$ git commit -m "explaination"


Git 더 나아가기


Local Repository 복사해오기

$ git clone ~/PATH/PROJECT

Remote Repository 복사해오기

$ git clone Remote_Repository_주소

Remote Repository와 연결하기(git clone을 하지 않은 경우)

$ git remote add origin Remote_Repository_주소

Remote Repository에 소스 저장하기

$ git push Local_Repository_Branch Remote_Repository_Branch

Git에 대해 더 자세히 알아보는곳

Git-scm