Error when “git push” to github

前端 未结 5 1706
不知归路
不知归路 2020-11-29 03:51

I have a public repository at github.com with 2 branches : master and test.

I created a new directory locally and did:

[          


        
5条回答
  •  佛祖请我去吃肉
    2020-11-29 04:14

    Perhaps try:

    git push git@github.com:{username}/{projectname}.git HEAD:test
    

    The format of the last parameter on that command line is a refspec which is a source ref followed by a colon and then the destination ref. You can also use your local branch name (my_test) instead of HEAD to be certain you're pushing the correct branch.

    The documentation for git push has more detail on this parameter.

提交回复
热议问题