성장과정(dev)/Git (feat. github, bitbucket)
git branch base 변경하기
lowellSunny
2022. 12. 27. 16:43
* 사용 예시
master 로부터 파생된 demo branch 로부터 새로운 브랜치를 작업하던 도중
demo branch 가 master 로 merge 되면서 더이상 해당 base branch 가 없어지게 되었다.
이런 경우 branch 의 base 를 변경하면 되는데 명령어는 다음과 같다.
git rebase --onto [new base branch] [old base branch]
$ git rebase --onto master origin/demo