fatal: Not a valid object name: 'master'

前端 未结 4 1728
故里飘歌
故里飘歌 2020-12-02 05:21

I have a private server running git 1.7 When I

git init 

a folder it doesn\'t create a master branch. Cause when i do:

gi         


        
4条回答
  •  情深已故
    2020-12-02 05:44

    First off, when you create a "bare repository", you're not going to be doing any work with it (it doesn't contain a working copy, so the git branch command is not useful).

    Now, the reason you wouldn't have a master branch even after doing a git init is that there are no commits: when you create your first commit, you will then have a master branch.

提交回复
热议问题