Contents

Develop
2015.08.18 00:41

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

Views 878 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
1089 System/OS [linux] 텔넷, FTP 텍스트 모드에서 사용 hooni 2003.04.23 11942
1088 System/OS [linux] 이기종간의 파일 공유(Samba) hooni 2003.04.23 14901
1087 System/OS [linux] sendmail 설정/사용 hooni 2003.04.23 14574
1086 System/OS [linux] DNS(Domain Name System) 설치, 설정 hooni 2003.04.23 12441
1085 System/OS [linux] Masquerade 가상 ip분할기법 hooni 2003.04.23 47939
1084 System/OS [linux] DHCP(Dynamic Host Configuration Protocol) 서버 hooni 2003.04.23 13024
1083 System/OS [linux] 네트웍 트래픽 모니터링(MRTG) hooni 2003.04.23 41852
1082 System/OS [linux] 커널 컴파일, 설정 hooni 2003.04.23 17846
1081 System/OS [linux] 네트워크 커널 설정.. hooni 2003.04.23 16481
1080 System/OS [linux] 최소한의 커널 설정(커널설치 전체과정) hooni 2003.04.23 17406
1079 System/OS [linux] Xwindow/Xmanager 사용 hooni 2003.04.23 13341
1078 System/OS [linux] ipchains 옵션 hooni 2003.04.23 13619
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 98 Next
/ 98