参考:https://www.cnblogs.com/schaepher/p/5561193.html#config_user
初始化仓库
git init
连接github
git config --global user.name "dctwan15"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
复制ssh keys,进入github
测试
ssh -T [email protected]
关联远程仓库
git remote add origin [email protected]:xxx.git
git pull origin main
git branch -m master main
git add -A
git status
git commit -m "message"
git push
git push -u origin main
这中间出现问题了,我将.git删除,重新git init,再执行上面的操作就可以了
之后再上传文件,直接下面即可
git add -A
git commit -m "message"
git push
标签:origin,github,add,git,使用,dctwan15,com
From: https://www.cnblogs.com/dctwan/p/17785237.html