2025.10.10(更新日: 2025.10.10)
ローカルのブランチ名を変更する

はじめに
現状、master。
リモートは、main。
ローカルのmasterをmainに変更
git branch -m master main
リモートの追跡ブランチを確認
git remote show origin
* remote origin
Fetch URL: https://github.com/ki-hi-ro/ki-hi-ro.com-2022.git
Push URL: https://github.com/ki-hi-ro/ki-hi-ro.com-2022.git
HEAD branch: main
Remote branches:
main tracked
refs/remotes/origin/master stale (use 'git remote prune' to remove)
Local branch configured for 'git pull':
main merges with remote master
Local ref configured for 'git push':
main pushes to main (local out of date)
HEAD branch: mainとなっているので、ローカルとリモートが合っている。
コメントを残す