• Home
  • About
    • lahuman photo

      lahuman

      열심히 사는 아저씨

    • Learn More
    • Facebook
    • LinkedIn
    • Github
  • Posts
    • All Posts
    • All Tags
  • Projects

git branch main으로 설정하기

28 Sep 2022

Reading time ~1 minute

git branch main으로 설정하기

2020년 6월 236857: all: replace usages of whitelist/blacklist and master/slave 에서 인종 차별적 요소나 주종 관계의 의미를 담는 whitelist/blacklist와 master/slave를 사용하지 말자는 발제가 있었습니다.

github도 기본 branch명을 master에서 main으로 변경하였습니다.

master => main 변경

branch 생성시 -M 옵션을 주게되면 해당 branch가 기본이 됩니다.

$ echo "# hello world" >> README.md
$ git init
$ git add README.md
$ git commit -m "first commit"
$ git branch -M main
$ git remote add origin git@github.com:lahuman/lahuman.github.io.git
$ git push -u origin main

참고자료

  • 236857: all: replace usages of whitelist/blacklist and master/slave
  • renaming


gitbranchmain Share Tweet +1