git 기본 브랜치 이름 변경 설정
//-------------------------------------
< 로컬 >
- 예) master -> main
git checkout master
git branch -m main
//-----------------------------------------------------------------------------
//-------------------------------------
< github >
- github 기본 브랜치(main, master) 이름 변경
https://github.com/저장소/settings/branches
Default branch 변경 메뉴
//-------------------------------------
브랜치 보호 설정
https://github.com/저장소/settings/branches
Branch protection rules -> Add rule
- 기본 브랜치 보호 옵션
Require a pull request before merging : 체크
Require approvals : 체크
//-----------------------------------------------------------------------------
//-------------------------------------
- git 설정 - 기본 브랜치 이름 변경 설정
git config --global init.defaultBranch 브랜치이름
//-------------------------------------
* 브랜치 삭제
- 로컬
git branch -d master
- 리모트 (github)
git push origin --delete master