How do you rename the main branch Git?
-
I had a project that I couldn't put a good gitlab on, and this time, it kind of worked out fine, but when I was writing in the terminal,
git branch
I' see all the available branches.
aleksey@aleksey:~/Downloads/NTZ/FittingRoom$ git branch * new
And it's called why.
new
♪ ♪ ♪Although it was when I had a project on my past repository, I tried to create branches and there was one.
new
, but then I sort of deleted... ♪Anyway, now I have the main branch called
new
...How do you fix that?
RIGHTS
aleksey@aleksey:~/Downloads/NTZ/FittingRoom$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master
-
The local branch can be renamed by the same team
branch
:$ git branch -m старое-имя новое-имя