gitub上的教程
create a new repository on the command line
echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:q1003722295/test.git
git push -u origin main
push an existing repository from the command line
git remote add origin git@github.com:q1003722295/test.git
git branch -M main
git push -u origin main
问题汇总
1.gitpull出错:error: failed to push some refs to
2.远程地址错误:
查看添加的远程地址:cat .git/config
删除添加的远程地址:git remote rm origin