Why does my 'git branch' have no master?

前端 未结 9 1160
醉梦人生
醉梦人生 2020-12-12 12:51

I\'m a git newbie and I keep reading about a \"master\" branch. Is \"master\" just a conventional name that people used or does it have special meaning like HEAD

9条回答
  •  悲哀的现实
    2020-12-12 13:33

    If you create a new repository from the Github web GUI, you sometimes get the name 'main' instead of 'master'. By using the command git status from your terminal you'd see which location you are. In some cases, you'd see origin/main.

    If you are trying to push your app to a cloud service via CLI then use 'main', not 'master'.

    example: git push heroku main

提交回复
热议问题