[git] branch name 변경

최승언·2022년 10월 5일
0

git

목록 보기
5/27

다른 사람의 코드를 가져다가 내 repo로 커밋할 때 브랜치가 master로 되어있는 경우가 있다. 요즘에는 git 정책이 바껴서 main으로 되어있는데 main으로 통일하기 위해 main으로 바꿔주고 아래 명령어를 실행하자

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
profile
작업하다가 막힌부분을 기록하는 곳.

0개의 댓글