I am working on a project. I have only the main branch in my GitHub repo and in my local project. Now I want to push changes to the new GitHub repo branch temp but I do not want to create any new branch for my local project.
I want only one branch for my local project and many branches for my GitHub repo.
Is there any way to create a new GitHub repo branch from the terminal?
If I am running git branch -M temp, then after running git branch -a, I am getting output as
* temp
remotes/origin/main
Does it mean I have only one branch in my local project and its name is changed to temp?
But if I am running git branch temp, then after running git branch -a, I am getting output as
* main
temp
remotes/origin/main
What is the use of -M here?