warning: remote HEAD refers to nonexistent ref, unable to checkout

前端 未结 11 1028
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 00:50

This seems like a popular error for different causes.

I\'ve got a simple bare git repo called \"kiflea.git\", I clone it like this:

git clone git://k         


        
11条回答
  •  [愿得一人]
    2020-12-01 01:10

    I had same issue when creating a bare repo.

    I solved it just cloning the repo, creating a local master branch and then pushing master to the remote repo.

    1) clone the repo

    $ git.exe clone --progress -v "the remote path" "my local path"
    

    2) create a master branch locally.

       $ git checkout -b master
    

    3) commit something in the local branch

    $ git add readme.md 
    $ git commit –m “Added readme”
    

    4) Push local master on the remote

       $ git push origin master
    

提交回复
热议问题