github.com で新規に repository を作成すると default branch が main になっていた。
※現在は github の repository 作成直後に rename が最速
repository
settings
branches
edit - rename
main is now named master
If you have a local clone, you can update it by running:
git branch -m main master
git fetch origin
git branch -u origin/master master
git remote set-head origin -a
(以下、過去の内容)
やったことのメモ(最短じゃないので適当)
git branch master
git checkout master
touch README.md
git add ./README.md
git commit -m 'first commit'
git merge main
git gc
git push origin main
git branch -D main
(create branch master as empty on the web github.com)
(change default to branch master on the web github.com)
git push -f origin master
git push --delete origin main
git branch -r
git rebase -i HEAD~~
(fixup)
git log
git commit --amend
git log
git push -f origin master
touch README.md
git add ./README.md
git commit -m 'first commit'
git push origin master
git remote set-head origin --auto
git branch -r
git gc