# default branch

2개의 포스트

Git 3일차 chapter5(~12)

Default Branch Repository 생성했을때 처음 가지는 브랜치 Main or Master 둘 중 하나로 시작함 수정도 가능 (view all branches) 사용자메뉴 - 세팅- Repositories 에서 Default Branch 설정 가능 > Remote Repository 복제하기 로컬을 생성하지 않은 상태에서 Git Clone 명령 사용하여 리모트를 로컬에 복제가능 Git clone 앞서 폴더 만들고, Git init으로 해당폴더 초기화, Remote Repository를

2023년 6월 6일
·
0개의 댓글
·
post-thumbnail

[Git] 로컬의 default 브랜치 master에서 main으로 변경하기

✅ 예전에는 default 브랜치명으로 master를 많이 이용했지만 노예제를 연상시킨다는 이유로 점차 main을 권장하고 있다. ✅ 현재는 github에서 새 레포지토리 만들면 default 브랜치가 main으로 생성된다. ✅ 반면 로컬에서 git init으로 만든 로컬 레포지토리의 default 브랜치명은 master이다. 에러 상황💥 👉🏽 There isn’t anything to compare : master and main are entirely different commit histories. 문구가 나오면서 push를 제대로 할 수 없다. 왜?🧐 로컬의 브랜치명은 master, 원격의 브랜치명은 main으로 되어있었다. github에서 만든 원격 레포지토리는 default 브랜치명이 자동으로 main으로 생성되었는데 로컬에서 git init으로 만든 로컬 레포지토리의 default 브랜치명은

2022년 9월 4일
·
0개의 댓글
·