블로그 이미지
윤영식
Full Stacker, Application Architecter, KnowHow Dispenser and Bike Rider

Publication

Category

Recent Post

2012. 12. 21. 11:31 Git, GitHub/Git Lec01

Git 내부 저장소를 최적화 해주는 작업과 zip/tar로 묶는 방법에 대해 알아보자 


  • git gc : 저장소의 크기 압축 및 최적화 (지저분한 내용을 정리)
  • git gc --aggressive : 변경 사항 델타(delta)단위로 저장한다. 저장단위를 처음부터 최적화 한다 
$ git gc
Counting objects: 201, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (123/123), done.
Writing objects: 100% (201/201), done.
Total 201 (delta 57), reused 193 (delta 54)

$ git gc --aggressive
Counting objects: 201, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (177/177), done.
Writing objects: 100% (201/201), done.
Total 201 (delta 61), reused 140 (delta 0)



  • git archive --format=zip --prefix=aa/ HEAD > bb.zip : zip 포멧으로 aa/ 디렉토리 밑으로 모든 파일을 넣어서 HEAD에서 압축 생성하여 bb.zip파일을 만든다 
  • git archive --format=tar --prefix=aa/ HEAD | gzip > bb.tar.gz : 상동. 단, gz에 대하여 gzip 압축 추가 함 
// zip 압축하기 
$ git archive --format=zip --prefix=mqtt_java_client/ HEAD > mqtt_java.zip

// 확인
$ ls
README.md                   jmqtt_client-1.0.jar  mqtt_java.zip  src
eclipse_feature.properties  license.properties    pom.xml

// tar 압축하기 
$ git archive --format=tar --prefix=mqtt_java_client/ HEAD > mqtt_java.tar.gz

$ ls
README.md                   jmqtt_client-1.0.jar  mqtt_java.tar.gz  src
eclipse_feature.properties  license.properties    pom.xml


* 참조 : Git 선화

'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] Release 브랜치 다루기  (0) 2012.12.20
[Git] tag 다루기  (0) 2012.12.20
[Git] Remote 저장소 연결 및 관리  (0) 2012.12.17
[Git] History 이용 및 관리하기  (0) 2012.12.13
[Git] Merge 종류와 충돌 해결하기  (0) 2012.12.12
posted by 윤영식
2012. 12. 20. 16:42 Git, GitHub/Git Lec01

git은 브랜치로 코드를 다룬다. 릴리즈 브랜치는 릴리즈할 코드를 분리할 목적에서 사용한다.


  • 구현하기로 한 기능 구현이 끝나면 릴리즈할 코드를 분리할 목적으로 브랜치를 생성한다. (완전히 검토된 상태는 아님)
  • 최소한의 변경은 발생하며, 버그나 로직 수정에만 집중한다 (기능추가 없음)
  • 이름은 RB_ 로 접두어를 붙이면 좋다
  • 릴리즈 브랜치는 마지막 테스트까지만 존재한다
  • 릴리즈 준비가 끝나면 태그(Tag)를 붙이고 해당 브랜치를 삭제한다 
  • 해당 릴리즈의 수정은 태그에서 브랜칭하여 수정 처리한다 

// 현재 태그 
$ git tag
1.0

// 태그에서 새로운 릴리즈 브랜치 만들기 (특정 브랜치에서 수정을 하고자 할 때)
$ git branch RB_1.0.1 1.0

// 브랜치 이동
$ git checkout RB_1.0.1
Switched to branch 'RB_1.0.1'

// 현재 브랜치 명
$ git branch
* RB_1.0.1
  another-from-1.0
  from-1.0
  master

// RB_1.0.1 수정이 완료되면 RB_1.0.1 에 대한 tag 1.0.1 을 만듦 
$ git tag 1.0.1

// 태그 목록 보기 
$ git tag
1.0
1.0.1

// 생성했던 브랜치는 삭제하고 태그 1.0.1 만 남김 
$ git checkout master
Switched to branch 'master'

$ git branch -D RB_1.0.1
Deleted branch RB_1.0.1 (was f5844d4).

$ git branch
  another-from-1.0
  from-1.0
* master


* 참조 : Git 선화

posted by 윤영식
2012. 12. 20. 16:01 Git, GitHub/Git Lec01

Git의 tag는 코드의 책깔피와 같아서 릴리즈된 코드에 tag를 달아두면 언제나 해당 태그로 이동할 수 있다. 즉, Freezing Code Release 정도로 보면 되겠다. Tag 는 브랜치처럼 다루어 지지만 읽기만 가능하다. 따라서 변경을 하고 태그로 부터 별도 브랜치를 생성하여 진행하면 된다. 


// 현재 상태 

$ git branch

* master


// 태그 생성

$ git tag 1.0


// 태그 목록 

$ git tag

1.0


// 태그로 이동 : 태그로 이동하면 마치 주인없는 땅으로 이동한 것과 같다 

$ git checkout 1.0

Note: checking out '1.0'.


You are in 'detached HEAD' state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by performing another checkout.


If you want to create a new branch to retain commits you create, you may

do so (now or later) by using -b with the checkout command again. Example:


  git checkout -b new_branch_name


HEAD is now at f5844d4... add license.properties


// no branch라고 나온다 

$ git branch

* (no branch)

  master


// 태그에서 별도의 브랜치를 생성하여 write 작업을 할 수 있다 

$ git checkout -b from-1.0

Switched to a new branch 'from-1.0'


// 전체 브랜치 목록

$ git branch

* from-1.0

  master


// 태그 1.0 에서 또 다른 브랜치 생성

$ git checkout -b another-from-1.0 1.0

Switched to a new branch 'another-from-1.0'


// 전체 브랜치 목록

$ git branch

* another-from-1.0

  from-1.0

  master


릴리즈 버전에 대하여 코드 freezing 시에 사용하자 

posted by 윤영식
2012. 12. 17. 11:12 Git, GitHub/Git Lec01

Git은 분산 버전 관리 시스템이므로 원격의 공유 저장소가 있다. Private 하게 원격 저장소를 구축할 수도 있고, 요즘은 GitHub을 SaaS 형태로 사용하면 된다. GitHub에선 Public과 Private이 있는데, Public 은 공짜, Private은 subscription 모델로 월단위로 과금을 한다. 



▶ remote 저장소 주소들 (GitHub기준)

  • SSH (Secure Shell) : git@github.com:<아이디>/<프로젝트>.git   (주로 write 권한을 주고자 할 때 사용 - push)
    예) git@github.com:ysyun/jmqtt_client.git
  • GIT 프로토콜 :  git://github.com/<아이디>/<프로젝트>.git  (주로 read 권한을 주고자 할 때 사용. 9418포트 사용 - pull)
    예) git://github.com/ysyun/jmqtt_client.git
  • HTTP, HTTPS : https://github.com/<아이디>/<프로젝트>.git  (속도 제일 느리지만 방화벽 오픈 필요없음)
    예) https://github.com/ysyun/jmqtt_client.git



▶ remote 저장소에 대한 별칭 관리

  • git remote add <별칭> <원격지 주소> : 예) git remote add origin https://github.com/ysyun/jmqtt_client.git
  • origin : 원격 저장소를 가르키는 일반적인 별칭으로 사용한다. 
  • git remote -v : 별칭한 내역을 볼 수 있다
  • git branch -r : 별칭에 대한 remote repository의 branch를 볼 수 있다 
  • git remote rm <별칭> : 별칭을 제거한다 
$ git clone https://github.com/ysyun/jmqtt_client.git
Cloning into 'jmqtt_client'...
remote: Counting objects: 195, done.
remote: Compressing objects: 100% (140/140), done.
Rremote: Total 195 (delta 54), reused 161 (delta 32)eceiving objects:  65% (127/
Receiving object
Receiving objects: 100% (195/195), 238.32 KiB | 184 KiB/s, done.
Resolving deltas: 100% (54/54), done.

$ cd jmqtt_client/

$ git branch
* master

$ git branch -r
  origin/HEAD -> origin/master
  origin/master

$ git remote -v
origin  https://github.com/ysyun/jmqtt_client.git (fetch)
origin  https://github.com/ysyun/jmqtt_client.git (push)



▶ remote 저장소 Pulling 
  • github의 경우는 머전 github에서 프로젝트의 remote repository를 생성한다
  • git clone <remote address>를 통하여 local PC의 local repository로 복제를 한다 (위 예제 참조)
  • git fetch <remote> <refspec> : 지역 저장소의 원격 브랜치가 갱신됨 (지역 브랜치에 변경사항을 합치진 않음)
  • git pull : default origin 원격 저장소에서 현재 브랜치로 merge 함 
  • git pull <remote> <refspec> : 원격 장소에서 가져온 소스를 현재 지역 브랜치에 merge 함
  • <remote> : 원격 저장소의 별칭 origin을 입력하면 된다. 별칭이 없다면 전체 주소를 넣어야 한다.
$ git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://github.com/ysyun/jmqtt_client
   e13af6f..bf80359  master     -> origin/master
Updating e13af6f..bf80359
Fast-forward
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




▶ remote 저장소 Pushing

  • git push : default origin 저장소를 & 현재 브랜치를 원격의 같은 브랜치로 푸싱한다 
  • git push <remote> <branch> :현재 브랜치를 원격의 신규 또는 존재하는 branch로 푸싱한다
  • git push <remote> <branch1>:<branch2> : 지역 branch1을 원격의 신규 또는 존해하는 branch2로 푸싱한다 
  • git push --dry-run <매개변수>: 푸싱된 변경 사항을 확인
  • <remote> : 원격 저장소의 별칭 origin을 입력하면 된다. 별칭이 없다면 전체 주소를 넣어야 한다.
yuwonsystem01@YSYUN91005152 /d/git-repositories/jmqtt_client (master)
$ touch license.properties
$ vi license.properties

// 파일하나 로컬 저장소에 추가하기
$ git add license.properties
$ git commit -a -m "add license.properties"
[master f5844d4] add license.properties
 1 file changed, 1 insertion(+)
 create mode 100644 license.properties

// 원격 origin 서버로 현재 master 브랜치내용 push 하기 (id & pwd 물어봄)
$ git push origin master  (또는 git push)
Username for 'https://github.com': ysyun@yuwin.co.kr
Password for 'https://ysyun@yuwin.co.kr@github.com':
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 297 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
To https://github.com/ysyun/jmqtt_client.git
   bf80359..f5844d4  master -> master


* 참조 : 선화의 Git

'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] Release 브랜치 다루기  (0) 2012.12.20
[Git] tag 다루기  (0) 2012.12.20
[Git] History 이용 및 관리하기  (0) 2012.12.13
[Git] Merge 종류와 충돌 해결하기  (0) 2012.12.12
[Git] Reset 사용하기  (0) 2012.12.11
posted by 윤영식
2012. 12. 13. 14:00 Git, GitHub/Git Lec01

Git의 local repository의 commit 히스토리를 보고, 관리하는 방법에 대해서 알아보자. 참조 블로그 내용을 명령어 위주로 정리함.



▶ 리비전 로그와 범위 알아보기 

  • git log : 지금까지 수행한 내역이 전부 보인다. 끝낼 땐 :q 차례로 입력한다
  • git log <hash id 7자리> : 특정 커밋내역만 출력 (출력 형식 : 커밋명, 작성자, 날짜, 로그메세지)
  • git log --since="5 hours" : 5시간 동안 현재까지 (minute 또는 2012-10.01 날짜 형식가능)
  • git log --before="5 hours" : 현재부터 5시간을 제외하고 5시간 전의 모든 커밋내역 보기 
  • git log 184dfa1..HEAD : 해쉬아이디부터 현재(HEAD)까지 로그 내역 (HEAD 생략가능)
  • ^ : 캐럿문자 -1 취급 (12819fe^ = 12819fe와 일치하는 리비전 바로 이전 리비전으로 해석), 여러 캐럿 사용가능 예) 34fa3rt^^ 
  • ~N : 커밋명에 N만큼 뺌 (12819fe~1 = 12819fe 바로 이전 리비전을 나타냄)
  • git log -1 HEAD^~2 = git log -l HEAD~1^^  같은 의미의 리비전 필터링임


▶ 버전간의 차이점 
  • git diff --stat 1.0 : 릴리스 사이의 통계를 보여줌
  • git blame <fileName> : 누구의 책임인지 보여줌 
  • git commit -C HEAD -a --amend : 커밋 수정하기 -> 커밋된 것을 다시 스테이징으로 옮겨줄 때 --amend를 사용한다 
  • git revert -n HEAD : 기존 커밋을 다시 돌려 놓을때 사용 -> 이전 커밋상태로 돌아감 
  • git reset --hard HEAD : 저장소 재설정임. 이전 커밋의 오류를 수정하려는 경우 사용 (--soft는 스테이징으로 옮김, --hard는 저장소와 작업트리에서 커밋을 완전 제거해 버림)
  • git rebase : 커밋 순서를 대화형으로 재배치 하는 것이다 (vi식으로 커밋 순서를 재배치 하는 것이다)
    • git rebase -i HEAD~3 : vi로 위치조정 -> 저장하면 rebase 작업을 수행한다
    • git log --pretty=format="%h %s" HEAD^3 : 변경 내역 확인

* 참조 : 선화의 Git


'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] tag 다루기  (0) 2012.12.20
[Git] Remote 저장소 연결 및 관리  (0) 2012.12.17
[Git] Merge 종류와 충돌 해결하기  (0) 2012.12.12
[Git] Reset 사용하기  (0) 2012.12.11
[Git] Hash Object 정보보기  (0) 2012.12.11
posted by 윤영식
2012. 12. 12. 15:00 Git, GitHub/Git Lec01

git은 branch를 만들어 "테스트할 기능", "새로운 기능", "버그 픽스"등에 대하여 만들고, master에 다시 merge를 할 수 있다. branch를 만들고, merge하는 방법을 알아보자 



Git 제어

  • git branch new : 새로운 branch 를 만든다. 아무런 내역이 없다.
  • git checkout new : 새로 만든 new 브랜치로 이동한다 
  • git checkout -b alternate master : master를 복제하여 브랜치를 만들고 alternate로 checkout 이동한다 
  • git branch -m alternate alternative : 브랜치의 명칭을 alternative로 변경한다 (-M 기존 같은 명칭 브랜치 있어도 덮어씀)
  • git brranch -d alternative : alternative 브랜치를 삭제한다 (-D 옵션은 강제 삭제)


▶ Merge 전략 
  • Straight Merge (바로 합치기) : 브랜치 변경 이력 전체를 합치는 방법
  • Squashed Commit (커밋 합치기) : 한 브랜치 이력 압축하여 다른 브랜치의 최신 커밋으로 하나 만드는 방법
  • Cherry-picking (선택하여 합치기) : 다른 브랜치의 하나의 커밋을 현재 브랜치에 적용하는 방법

각 합치기에 대해서 위->아래 명령순으로 살펴보자 

> 바로 합치기 
  • git checkout -b alternate master
  • git add about.html (내용 넣음) -> git commit -m "add about"
  • git checkout master 
  • git merge alternate : master 브랜치에 alternate 브랜치를 합친다 (즉, about.html 파일이 신규로 합쳐짐)

> 커밋 합치기 
  • git checkout -b contact master
  • git add contact.html (주소 내역 추가) -> git commit -m "add contact address"
  • contact.html (email 내역 추가) -> git commit -a -m "add contact email" (즉, commit object 두개가 된다)
  • git checkout master
  • git merge --squash contact : contact의 커밋 두개를 하나로 만들어 master의 staging에 추가함 (git status 확인)
  • git commit -m "add contact address" -m "add contact email"  (master 브랜치에 contact.html 을 커밋한다)

> 선택하여 합치기
  • git checkout contact
  • git commit -a -m "add contact sns id" (contact.html안에 twitter 계정추가 commit object Hash 코드를 34abcd 로 가정함)
  • git checkout master
  • git cherry-pick 34abcd  ( contact 브랜치의 34abcd 커밋을 master 브랜치에 커밋한다)
  • git reset --hard HEAD 마지막 커밋을 master 브랜치에서 제거
  • git cherry-pick -n 34abcd ( -n 옵션 사용하면 master 브랜치의 staging에 넣음, 커밋안함. git status 로 확인)
  • git commit (최종 커밋함)


▶ Merge시 충돌 해소하기 

두개의 브랜치를 합치기하다 같은 파일의 내용이 동시에 변경되었을 경우 해결방법을 알아보자. 
  • git checkout -b about master : about 브랜치 생성 후 checkout
  • git add about.html (about 내역 입력) -> git commit -m "add about"
  • git branch about2 abut : about 브랜치를 기반하여 about2 브랜치를 생성
  • git commit -a -m "add XXX" : about 브랜치의 about.html 파일에 XXX 입력
  • git checkout about2 
  • git commit -a -m "add YYY" : about2 브랜치의 about.html 파일에 YYY 입력 (이제 about 브랜치의 about.html과 about2 브랜치의 about.html 파일에 XXX 와 YYY 충돌이 발생함)
  • git checkout about
  • git merge about2 : about2 브랜치를 about 브랜치로 바로 합치기
  • about.html 안에 conflict 내역이 표시됨 : 내역을 직접 수정하거나, git mergetool 명령으로 merge.tool 값 확인하고 도구로 합치기 시도함 (도구 사용법은 다시 상세히 봐야겠음)
<<<<<<<< HEAD : 밑으로 현재 브랜치 코드 나옴
>>>>>>>> about2 : 합치려는 다른 브랜치 코드 나옴
======= : 구분자

예) about.html 파일안의 conflict 내역
<<<<<<<< HEAD
XXX
=======
YYY
>>>>>>>> about2


'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] tag 다루기  (0) 2012.12.20
[Git] Remote 저장소 연결 및 관리  (0) 2012.12.17
[Git] History 이용 및 관리하기  (0) 2012.12.13
[Git] Reset 사용하기  (0) 2012.12.11
[Git] Hash Object 정보보기  (0) 2012.12.11
posted by 윤영식
2012. 12. 11. 11:28 Git, GitHub/Git Lec01

Git의 로컬 Repository에 저장된 commit 내역에서 이전 commit 내역으로 이동하고 싶을 경우. HEAD를 조작함으로써 가능하다. 


  • 지금 까지 커밋 내역 보기 : git reflog  (하기 내역으로 파란색으로 3 번의 commit 이 존재한다)
git reflog
c6d5478 HEAD@{0}: commit: add license properties
aa64af1 HEAD@{1}: checkout: moving from master to rb_1.0
aa64af1 HEAD@{2}: checkout: moving from master to master
aa64af1 HEAD@{3}: merge rb_1.0: Fast-forward
e13af6f HEAD@{4}: checkout: moving from rb_1.0 to master
aa64af1 HEAD@{5}: commit: License Info about mqtt client for java
e13af6f HEAD@{6}: checkout: moving from master to rb_1.0
e13af6f HEAD@{7}: commit: add eclipse foundation software user agreement propert
475d6ae HEAD@{8}: clone: from https://github.com/ysyun/jmqtt_client.git


  • c6d5478 commit 내역에서 aa64af1 commit 내역으로 이동하기 : git reset --soft HEAD~  (staging, working 영향없음)
  • --mixed 는 staging을 local repository와 같게 만든다. 즉, staging에 HEAD정보를 복사하여 영향줌. working 영향없음 
  • --hard 는 staging, working 둘다 영향을 줌
$ git reset --soft HEAD~

yuwonsystem01@YSYUN91005152 /d/git-repositories/jmqtt_client (rb_1.0)
$ git reflog
aa64af1 HEAD@{0}: reset: moving to HEAD~
c6d5478 HEAD@{1}: commit: add license properties
aa64af1 HEAD@{2}: checkout: moving from master to rb_1.0
aa64af1 HEAD@{3}: checkout: moving from master to master
aa64af1 HEAD@{4}: merge rb_1.0: Fast-forward
e13af6f HEAD@{5}: checkout: moving from rb_1.0 to master
aa64af1 HEAD@{6}: commit: License Info about mqtt client for java
e13af6f HEAD@{7}: checkout: moving from master to rb_1.0
e13af6f HEAD@{8}: commit: add eclipse foundation software user agreement propert
475d6ae HEAD@{9}: clone: from https://github.com/ysyun/jmqtt_client.git

// git reset에서 이전 commit 이동하였으나 다시 앞선 커밋인 c6d5478 로 원복하고 싶을 경우
$ git reflog
aa64af1 HEAD@{0}: reset: moving to HEAD~
c6d5478 HEAD@{1}: commit: add license properties
// 위에서 HEAD@{1} 을 reset하면 다시 최신 HEAD로 간다 
$ git reset HEAD@{1}


  • aa64af1 commit 으로 이동했을 때 상태 정보를 확인 : git status  (c6d5478 commit 되기전 rename 명령을 내렸었음)
$ git status
# On branch rb_1.0
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       renamed:    license.dat -> license.properties

// 만일 staging에 있는 변경내역을 반영하고 싶지 않을 경우 
// 변경 파일이 하나 존재 
$ git status
# On branch feature_input_data
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:   app/views/moving_average.html
#
no changes added to commit (use "git add" and/or "git commit -a")

// 설명문의 내역에 따라 파일이 있는 경로명과 함께 입력 
$ git checkout -- app/views/moving_average.html

// status로 다시 확인해 보면 방금 변경된 특정 staging에 있는 파일 내역을 이전 commit 당시 상태로 되돌려 놓았음
$ git status
# On branch feature_input_data
nothing to commit, working directory clean

  • Git 에서 HEAD, Branch는 Pointer이다 

* 참고 : 개발자를 위한 고급 Git 활용 (p100부터)


'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] tag 다루기  (0) 2012.12.20
[Git] Remote 저장소 연결 및 관리  (0) 2012.12.17
[Git] History 이용 및 관리하기  (0) 2012.12.13
[Git] Merge 종류와 충돌 해결하기  (0) 2012.12.12
[Git] Hash Object 정보보기  (0) 2012.12.11
posted by 윤영식
2012. 12. 11. 11:02 Git, GitHub/Git Lec01

commit을 하여 Blob format으로 되어 있는 binary 파일에 대한 명칭은 SHA-1 해쉬알고리즘으로 해쉬명을 가지고 있다. 파일명과 해쉬명을 오가면 확인하는 방법을 알아보자 


  • 파일명 통하여 해쉬명 알아내기 : git hash-object <fileName>
$ git hash-object license.properties
b2ece065fd82ac65e5871a602166586fe691e3e7


  • 해쉬명 앞 6자리를 통하여 변경 내역이 무엇인지 파악하기 : git cat-file -p <해쉬명 앞 6자리>
$ git cat-file -p b2ece0
mqtt client for java version 1.0
written by ysyun, 2012


  • 전체 해쉬에 대한 파일명 맵핑 목록 보기 : git ls-files -s  ( .git/index 파일 내역을 참조함 )
$ git ls-files -s
100644 63bc96b980e4f36e5679312d4437908eb3add614 0       .classpath
100644 c349675aef6a30ee914d585a741bd742aad8b027 0       .project
100644 8e4055a6fa840c0bb4179360cee8a6e10352309f 0       .settings/org.eclipse.jdt.core.prefs
100644 8a6d87a1e842e58d1ea6bb707510c62f5eacc3d0 0       .settings/org.eclipse.m2e.core.prefs
100644 3ae4edb1acf2899b42b8ee6b9fd1c1ccb07cdd48 0       README.md
100644 026d2feeef3eccda9bbaae9db1ad251b9a436203 0       eclipse_feature.properties
100644 5ada071fd63361c553a5a1f7e9b816025e992c13 0       jmqtt_client-1.0.jar
100644 b2ece065fd82ac65e5871a602166586fe691e3e7 0       license.properties
100644 5f6e56a8381891e9ad64b61f58716ec7925ec5bb 0       pom.xml
100644 1fdcc8c6237579974f662d902f28d13f4c592580 0       src/main/java/MqttService.java




▶ Git의 4가지 객체


> Blob Object

  • Header + Content 
  • zlib으로 압축되어 있음
  • .git/objects/ 아래 있음 

> Tree Object
  • blob + 다른 tree 객체
  • 폴더와 같은 개념
  • .git/objects/ 아래 있음 

> Commit Object
  • blobs + trees + author + date + message
  • .git/objects/ 아래 있음

> Tag Object 
  • pointer to commit object
  • .git/refs/tags/ 아래 있음 


* 참고 : 개발자를 위한 고급 Git 활용 (p50부터)

'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] tag 다루기  (0) 2012.12.20
[Git] Remote 저장소 연결 및 관리  (0) 2012.12.17
[Git] History 이용 및 관리하기  (0) 2012.12.13
[Git] Merge 종류와 충돌 해결하기  (0) 2012.12.12
[Git] Reset 사용하기  (0) 2012.12.11
posted by 윤영식
prev 1 next