Shell/Bash: rename branch to main Example

By

Shell/Bash Example: This is the "rename branch to main" Example. compiled from many sources on the internet by SimpleTutorials.org

rename branch to main

$ git branch -m master main

or create a new one

$ git checkout -b main

rename branch to main

$ git push -u origin main

rename branch to main

$ git push origin --delete master



* Summary: This "rename branch to main" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others