[Git] Git branch 기본 사용법

HYl·2022년 3월 1일
1

Git branch 생성 후, 바로 branch로 이동

  • git switch -C newBranch
  • git checkout -b newBranch

Git branch 삭제

  • git branch -d testBranch
  • branch 삭제한 것을 원격에 업데이트
    => git push origin --delete testBranch

Git branch 이름 변경

  • git branch --move beforeName afterName
  • branch 이름 변경 한 것을 원격에 업데이트
    => git push --set-upstream origin afterName

Git branch 와 master 간의 commit 내역 확인

  • git log master..testBranch
profile
꾸준히 새로운 것을 알아가는 것을 좋아합니다.

0개의 댓글