Error when “git push” to github

前端 未结 5 1714
不知归路
不知归路 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:03

    Also, you don't need to type out the whole url each time you want to push. When you ran the clone, git saved that URL as 'origin', that's why you can run something like 'merge origin/test' - it means the 'test' branch on your 'origin' server. So, the simplest way to push to your server in that case would be:

    git push origin my_test:test
    

    That will push your local 'my_test' branch to the 'test' branch on your 'origin' server. If you had named your local branch the same as the branch on the server, then the colon is not neccesary, you can simply do:

    git push origin test
    

提交回复
热议问题