Why does my 'git branch' have no master?

前端 未结 9 1163
醉梦人生
醉梦人生 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:19

    It seems there must be at least one local commit on the master branch to do:

    git push -u origin master
    

    So if you did git init . and then git remote add origin ..., you still need to do:

    git add ...
    git commit -m "..."
    

提交回复
热议问题