Contents

Develop
2015.08.18 00:41

[git] 쉬운 버전관리 Git 설명

Views 945 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

# 쉬운 버전관리 Git 설명

 

Part 1 기본

 

 1. Git 이란?
파일의 변경 이력을 관리할 수 있는 버전관리시스템
CVS, SVN과 달리 네트워크가 끊긴 상황에서도 버전 기록(commit) 가능
리누스 토발즈가 개발
GitHub.com 서비스를 통해서 확산
프로젝트별로 관리 가능
BitBucket, NForge 등은 무료 비밀 저장소 지원


 2. 다운로드, 설치
http://git-scm.com 에서 Windows, Linux, MacOSX 다운로드 가능


 3. 사용자 설정
코드를 변경한 사람의 이름과 이메일을 등록
git bash 실행
`git config --global user.email "kenu.heo@gmail.com"`
`git config --global user.email "kenu"`


 4. Git 시작하기
 `git init`
.git 폴더가 생기면서 이하 파일 버전관리 시작

 
 5. 관리 파일 추가하기
 `git add filename`
index에 추가. stage에 올라감.
 `git status` 명령으로 상태 확인

* Git 파일 상태
  * Workspace
  * Stage
  * Repository
  * Remote Repository

 6. 버전 등록하기
 `git commit -m "메시지"`


 7. 변경 이력 보기
 `git log`
 `git log --oneline`


 8. 이전 버전으로 복원하기
 `git reset --hard`
 `git reset --hard versionhash`


 9. 파일 제외하기
 .gitignore 파일에 패턴 추가

 


Part 2 코드 공유


10. GitHub 회원가입
 https://github.com


11. GitHub 프로젝트 만들기
 new Repository 메뉴 선택


12. 프로젝트 PC로 가져오기
 `git clone https://github.com/아이디/프로젝트명.git`
 `git clone https://github.com/그룹명/프로젝트명.git`


13. 원격 코드 가져오기
 `git pull`


14. 원격에 코드 올리기
 `git push`

 


[참고]
누구나 쉽게 이해할 수 있는 Git 입문
http://backlogtool.com/git-guide/kr/

 

Git 브랜치 배우기
http://learnbranch.urigit.com/

 

[출처] https://gist.github.com/kenu/bfcee2cc672805672b92


?

List of Articles
No. Category Subject Author Date Views
1101 System/OS [linux] 프로그램 설치방법 (내공쌓기) hooni 2003.04.23 13478
1100 System/OS [linux] 계정관리하기(내공쌓기) hooni 2003.04.23 13289
1099 System/OS [linux] 기본적인 설정하기(내공쌓기) hooni 2003.04.23 14046
1098 System/OS [linux] 새 하드디스크 추가하기..(내공쌓기) hooni 2003.04.23 13853
1097 System/OS [linux] 아파치설치/설정 hooni 2003.04.23 14541
1096 System/OS [linux] 아파치설치/설정(CGI부분) hooni 2003.04.23 14615
1095 System/OS [linux] 아파치설치/설정 - SSI(Server Side Include) hooni 2003.04.23 13249
1094 System/OS [linux] 아파치 설치/설정(proxy) hooni 2003.04.23 13004
1093 System/OS [linux] 아파치설치/설정(모니터링) hooni 2003.04.23 14213
1092 System/OS [linux] 아파치설치/설정 - 사용인증 hooni 2003.04.23 15139
1091 System/OS [linux] 아파치설치/설정 - 알리어싱(aliasing) hooni 2003.04.23 51444
1090 System/OS [linux] 랜카드가 2개 일 때 네트워크 설정 hooni 2003.04.23 30113
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 98 Next
/ 98