Rename Master to Main for Git and GitHub in the Terminal

preview_player
Показать описание
In this video I will show you how to rename your default master branch to something else. Additionally you will learn what not to forget when you did the actual rename.

In this example the new name is going to be main, but it could be any another name as well. I will show you how to rename your branch through terminal commands and not just GitHub. That way you know how to do it for all git providers.

⏱ Timestamps
0:00 Intro
0:38 Hanselman Blogpost
1:10 Sample Repository
1:25 Rename Master to Main in Terminal
2:23 Change Links on Your Repository to new branch
2:57 Retarget Open Pull Requests
3:35 Update Your (Draft) Releases on GitHub
4:08 Default Branch and Branch Policies
5:30 Remember to Update Your CI/CD pipelines and others
5:50 Update Local Cloned Repos
6:50 Set Main as New Default For All
8:00 GitHubs' Plans for Branch Renaming (See Links)
8:38 Set Main as Default on Your GitHub Account
9:43 Delete the Master Branch
11:11 Outro

🔗 Links

#git #branch #rename
Рекомендации по теме
Комментарии
Автор

Have you renamed your branch name already? Did I miss anything that should be renamed as well? How was the process for you?

Also this is my first git video, let me know what else you want to see!

jfversluis