[TIL][Tools]Git Rebase 방법

Bohyeon Koo·2021년 1월 31일
0

Programming Tools

목록 보기
2/2
post-thumbnail
git add .
git commit
git checkout main
git pull origin main
git checkout feature/~~

git rebase -i main
가장 과거의 commit만 pick 하고,
다른 commit 들은 스쿼시(s) 표기
ecs 후, :wq!
내용을 확인 후, 다시 :wq!
git push origin feature/~~ (에러 뜸)
gir push origin feature/~~ -f (강제 푸시)

진행하면서 컨플릭트가 필수적으로 발생되고,
발생 시 컨플릭트를 해결한 후에 다시 리베이스를 진행하는 식으로 반복한다.
리베이스 중 리베이스를 중단할 수 있으며,
특이점이 없을 때는 리베이스 컨티뉴로 리베이스를 끝마칠 수 있다.

0개의 댓글