카테고리 없음

[github] main 을 master로 바꾸기

참치바나나 2021. 2. 3. 16:26

 

git, master와 main 연결하기

github에서 master branch를 main 이라고 이름을 바꿈. 새로 repository를 만들어 연결하니 문제가 생김

 

해결방법

1. main 이름을 master로 바꾼다

git branch -m master main 
git push -u origin main 
git remote set-head origin main

 

출처

stackoverflow.com/questions/64249491/difference-between-main-branch-and-master-branch-in-github

 

Difference Between Main Branch and Master Branch in Github?

I tried git push on master branch but it just shows that I have new pull request but when I click on new pull request it takes me to comparing changes but doesn't show any option to add those changes

stackoverflow.com