1. 流程
rm -rf .git #删除.git
git init
# 这两步是重新初始化仓库,如果是第一次,则需要执行,否则不需要。
git add .
git commit -m "desc"
git remote add origin https://github.com/xxxxxxx
git push -u origin master
2.碰到的问题
- fatal: unable to access ‘https://github.com/CHH3213/cdpr_uav_ddrive/’: OpenSSL SSL_read: Connection was reset, errno 10054
使用git push 时报错:fatal: unable to access 'https://github.com/CHH3213/cdpr_uav_ddrive/': OpenSSL SSL_read: Connection was reset, errno 10054
依据网上解决思路成功:
在相应的代码本地仓库下git bash,并运行:
git config --global --unset http.proxy
成功。
- Permission denied (publickey). fatal: Could not read fro
报错“Permission denied (publickey).