GitHub has started to change the name of the default branch from master to main. Now, the default branch in my remote repository is called main instead of master.
However, my local repository has the default branch named master, and if I commit and push changes, it uploads it to a new branch (called master) instead of uploading it to the default branch (called main).
I know there is some controversy in the use of master as the name of the default branch, but I have some commands automatized after many years of using git like "git push origin master", or "git checkout master".
Is there any way of setting the default branch name to master instead of main? I know how to change the repository name in my local repository and in GitHub, but now, each time I create a new repository, the default branch is main, and when I do "git init" in a directory, the default branch is master, so I have to manually change it.