-
Notifications
You must be signed in to change notification settings - Fork 10
04. git 04
Dongwook Lee edited this page Mar 18, 2013
·
2 revisions
- rebase
0. git-test.tgz 압축 풀기
- -from-line, -from-master 두 군데에 푼다
- git checkout
- HEAD 이동 확인: HEAD는 작업 하는 도중 활발
- cat .git/HEAD
- git checkout HEAD^
- git branch: (no branch)
- detached head
- cat test.txt 예측
- checkout은 workspace를 건드리는 명령어
- git checkout line
- git reset vs git checkout
- git reset HEAD^ 예측
- git checkout -- test.txt 으로 동기
- git reset --hard HEAD^
- line, HEAD 동시 이동 확인
- checkout과는 달리 현재 reference가 모두 따라간다
- TODO: 연습 문제
- git merge(back-merge) 후 merge commit을 reset 하기
- git checkout 9c6da70
- git reset (--hard)를 하지 않았을 경우 line 브랜치가 HEAD^ 위치에 있는 문제가 발생
- git rebase
- start from master? line?
- rebase의 정의
- git reset --hard line
- git reflog에서 sha1 확인
- .git/refs/heads/master 수정
- git checkout 9c6da70(line)
- git branch
- git checkout line;git branch
- git rebase master
- git add 해야함
- commit 순서 확인
- git checkout master && git merge line
- 용어: fast-forwarding
- (again)
- git checkout master
- git branch
- git checkout -master
- git branch
- git rebase line
- git branch -d line
- git checkout