The command to change the branch name is like below, use "-m" flag to modify the branch name.
git branch -m master main
Now the branch name will be called "main" and you can push it to the online repository.
git push --set-upstream origin main
136
3 years ago
0 comments
git branch -m master main
git push --set-upstream origin main
Frontend
Resource
Average
Average
No recent searches
Leave a reply