The sequence of operations is as follows
git config --global user.email ""
git config --global user.name ""
Submit it to the local warehouse for the first time
git add .
git commit
Submit to the remote warehouse
git remote add origin git@xxx
git pull orgin xxx
Note that pull here can be pulled
but push will return an error
The error message is as follows:
error: src refspec xxx does not match any.
error: failed to push some refs to 'git@'
I searched stackOverflow and there is a solution
git push origin HEAD:branch
But I would like to ask if there is any way to restore it to the following method?
git push origin xxx
And the push here shows root in the git.log log file
Thank you for the invitation. You can execute it
git pull origin 分支
,执行git push origin 分支
就出错!好神奇啊!你在你本地执行ssh –T git@github.com
Try it and see what happensYour remote warehouse doesn’t have a corresponding branch, how do you push it?