TIL > rebase > squash

Agnes Shin·2022년 3월 15일
0

rebase (multiple commits and unnessary commit) is not good! >> option use squash (combines file from the last merge stage)

  1. create signin file feature/signup (combine commit --> review applied + review applied 2)

  1. main branch > remote main > pull >>>> push > feature branch >>> git rebase -i main

    a. how to use rebase >>> move to main >> current git pull origin main >> git rebase -i main >> editor is visible >> insert mode click i to change mode >> p, pick = use commit!! + s pick others below will be squashed...>> commit

  1. when successful!! >> git log (commit message) >> push

>> esc -> :wq!

  1. rebase push >>> when >> git push origin feature/login -f

  1. after commit 2 times or 3 times, use rebase >> 충돌 적어진다
  1. git add . >>> staging only, (don't commit!!) git add ./ git rebase --conitnue

============

profile
30기 신윤숙 / FE

0개의 댓글