상세 컨텐츠

본문 제목

git rebase 명령어 중 유용한 옵션 option --onto

Study/GIT

by 휀스 2012. 11. 30. 00:57

본문


git rebase 명령어 중 유용한 옵션 --onto


$ git rebase branchA


명령은 현재 Branch 의 분기점을 branchA 의 HEAD 로 옮긴다는 뜻이다.


d 가 c 앞에 붙어 d' 가 된다.


그럼 onto 옵션을 주면?


--onto


$ git rebase --onto branchA branchB branchC


branchC 의 history 중 branchB 부터 branchA 의 HEAD 로 옮긴다는 뜻이다.


$ git rebase --onto c d f

라고 했다면 아래와 같이 rebase 된다.


git rebase --help 에 유용한 정보가 많다. help 를 많이 봐야겠다.


알고나면 한줄 모르면 캐고생....





관련글 더보기