git newspaper: src refspec xxx does not match any wrong solution of

When we use git push to GitHub above its project code, inadvertently encounter above the title given error. In fact, the solution is simple.

First, re-initialize the warehouse

  1. git init

Second, add a remote branch name

  1. git remote add xxx(分支名称) git@github.com:xxx/xxx.git
  2. 这里的分支名称可以是本地新创建的分支并且未提交到远程仓库的分支

Three, push to a remote repository

  1. git push origin xxxx(分支名称)

 

  OK, we're done.

Guess you like

Origin www.cnblogs.com/myprogramer/p/11595268.html