While adding a newly created project to source control by default studio is creating a branch with the name "Main" instead of "Master"
- While adding the newly created project to source control by default Studio is creating a branch with the name "Main" instead of "Master" starting with the 21.4 version.
- The reason behind this is that Github has changed the default branch of all new repositories to main instead of master.
If we want to use the branch name as "master" instead of "main" please follow the below steps
1. After creating the project and clicking on "Git Init" as shown in the below image.
2. After clicking on Git init, select the project folder to add it to the repo, and instead of commit and push, click on a commit as shown in the below image.
3. After clicking on commit then again click on the branch manage branches as shown in the below image.
4. Next, select the existing main branch and change the name to "master" as shown in the below image and click on update and then save.
5. After clicking on save the branch will get renamed from main to master and now you can push the project to repo by clicking on push as shown in the below image.
After clicking on the push button if there is any branch name with the master is there is a repo already, it will push the code to that repository and if there is no branch with the name master is not created it will create a branch with the name as master and push the code to that branch.