Changing the default branch name on GitHub
summary
Shows the concrete steps to rename an existing repo default: run git branch -m master main, push with git push origin main, then update the remote default via change default branch in Settings → Branches before deleting the old remote branch (remote deletion is blocked while it’s the default). Warns about CI/CD and collaborators needing coordination. Offers a practical workaround: add a shell wrapper in your ~/.zshrc or ~/.bashrc that renames the initial branch to main on git init and remember to source it.
AI-written summary · about
related talks
21mGetting the Most Out of Git
26mGit in Control, Version Control and How it Could save Your Life
31mHow GitHub Uses GitHub to Build GitHub
32mGit
24mGet a Jumpstart on Collaboration and Code Review in GitHub
14mFive Ways to Break a Git Repository
46mGit Workflow Etiquette: Repository Organization for Clean Codebases
49mBeyond git add/commit/push
