在Github上面創(chuàng)建倉(cāng)庫(kù)后,第一次推送
git push -u origin master
報(bào)錯(cuò):
error: failed to push some refs to 'git@***.git'
接著我嘗試從遠(yuǎn)程倉(cāng)庫(kù)先pull
git pull origin master
報(bào)錯(cuò):
fatal: Couldn't find remote ref master
解決方法:
第一步:先將所有文件添加
git add .
第二步:提交并注釋
git commit -m "xx"
最后:推送到遠(yuǎn)程倉(cāng)庫(kù)
git push -u origin master